Skip to content

Conversation

@scottmcm
Copy link
Member

@scottmcm scottmcm commented Nov 28, 2025

@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 Nov 28, 2025
@rustbot
Copy link
Collaborator

rustbot commented Nov 28, 2025

r? @jdonszelmann

rustbot has assigned @jdonszelmann.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

}

/// Ensures that an error is printed. See `Level::DelayedBug`.
/// Ensures that an error is printed. See [`Level::DelayedBug`].
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice <3

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How to tell I didn't really know that I was doing here so ended up reading docs 🙂

@jdonszelmann
Copy link
Contributor

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Dec 1, 2025

📌 Commit 673be1b has been approved by jdonszelmann

It is now in the queue for this repository.

@bors bors 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 Dec 1, 2025
bors added a commit that referenced this pull request Dec 1, 2025
Rollup of 6 pull requests

Successful merges:

 - #149393 (expand valid edition range for use-path-segment-kw.rs)
 - #149427 (Make the capitalization explicit on keyword misspell error)
 - #149433 (Use a delayed bug for this layout ICE)
 - #149473 (Tidying up UI tests [7/N])
 - #149505 (Update the comment in the add_typo_suggestion function)
 - #149513 (`rust-analyzer` subtree update)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit ab2cdfc into rust-lang:main Dec 1, 2025
11 checks passed
@rustbot rustbot added this to the 1.93.0 milestone Dec 1, 2025
rust-timer added a commit that referenced this pull request Dec 1, 2025
Rollup merge of #149433 - scottmcm:delay-layout-ICEs, r=jdonszelmann

Use a delayed bug for this layout ICE

Fixes #144501
cc `@matthiaskrgr`
@RalfJung
Copy link
Member

RalfJung commented Dec 2, 2025

Not super happy about this, IMO it is a hack that works around the issue that buggy types get passed to deep into rustc. :/ We are being way too aggressive with continuing compilation of invalid programs, and that makes it hard to ensure that the inner parts of the compiler have reliable invariants to build on. You may have fixed this ICE, but now e.g. the interpreter and other parts of the compiler are exposed to invalid layouts that can easily cause ICEs down the line. (Also see my earlier comment.)

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: layout.ty.discriminant_for_variant(tcx, idx).unwrap().val != u128::from(idx.as_u32()

5 participants