Skip to content

Fix ICEs due to incomplete typechecking on struct literals with syntax errors.#153453

Merged
rust-bors[bot] merged 1 commit intorust-lang:mainfrom
kpreid:fix-153388
Mar 5, 2026
Merged

Fix ICEs due to incomplete typechecking on struct literals with syntax errors.#153453
rust-bors[bot] merged 1 commit intorust-lang:mainfrom
kpreid:fix-153388

Conversation

@kpreid
Copy link
Contributor

@kpreid kpreid commented Mar 5, 2026

Fixes #153388.
Followup to #153227.

Today I have learned that when we don’t emit a diagnostic specifically from typeck, we need to call self.infcx.set_tainted_by_errors() to signal that the type checking is incomplete despite the lack of error.

r? fmease

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Mar 5, 2026
@estebank
Copy link
Contributor

estebank commented Mar 5, 2026

r=me once green

@fmease
Copy link
Member

fmease commented Mar 5, 2026

Needn't wait on CI. @bors r=fmease,estebank rollup

@rust-bors
Copy link
Contributor

rust-bors bot commented Mar 5, 2026

📌 Commit 072bd69 has been approved by fmease,estebank

It is now in the queue for this repository.

@rust-bors rust-bors bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 5, 2026
rust-bors bot pushed a commit that referenced this pull request Mar 5, 2026
…uwer

Rollup of 9 pull requests

Successful merges:

 - #153399 (constify `Vec::{into, from}_raw_parts{_in|_alloc}`)
 - #153436 (Use shlex instead of shell-words)
 - #150845 (bootstrap: minimal fix for ./x install src with build.docs = false)
 - #152906 (Make `const_lit_matches_ty` check literal suffixes for exact type match)
 - #153378 (Rename `QueryCache::iter` to `for_each`)
 - #153386 (Minor query cleanups)
 - #153422 (Add a comment explaining the 'tcx lifetime.)
 - #153435 (Fix obtaining def_id from unresolved segment)
 - #153453 (Fix ICEs due to incomplete typechecking on struct literals with syntax errors.)
@rust-bors rust-bors bot merged commit 11c4bea into rust-lang:main Mar 5, 2026
11 checks passed
rust-timer added a commit that referenced this pull request Mar 5, 2026
Rollup merge of #153453 - kpreid:fix-153388, r=fmease,estebank

Fix ICEs due to incomplete typechecking on struct literals with syntax errors.

Fixes #153388.
Followup to #153227.

Today I have learned that when we don’t emit a diagnostic *specifically from typeck*, we need to call `self.infcx.set_tainted_by_errors()` to signal that the type checking is incomplete despite the lack of error.

r? fmease
@rustbot rustbot added this to the 1.96.0 milestone Mar 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ICE]: type mismatch when copying!

4 participants