fix(thir): Include NoneWithError in Enum Struct Tail Assertion#153394
Merged
rust-bors[bot] merged 1 commit intorust-lang:mainfrom Mar 5, 2026
Merged
Conversation
Contributor
Author
|
@rustbot label T-compiler C-bug regression-from-stable-to-nightly |
This comment has been minimized.
This comment has been minimized.
Contributor
Author
|
@bors retry |
Contributor
|
@TKanX: 🔑 Insufficient privileges: not in review users |
Contributor
Author
|
CI crashed, I can't rerun. I need to rebase and recommit. |
de785a4 to
20768d8
Compare
Contributor
Contributor
Contributor
Author
|
@dingxiangfei2009 Thanks!! You're always so fast |
rust-bors bot
pushed a commit
that referenced
this pull request
Mar 5, 2026
…uwer Rollup of 8 pull requests Successful merges: - #153361 (enable `PassMode::Indirect { on_stack: true, .. }` tail call arguments) - #153369 (library/test: always enable unstable features for miri) - #152283 (Properly pass offload sizes to kernel args) - #153323 (Remove `impl QueryVTable`) - #153385 (Fix comment on `is_horizontal_whitespace`) - #153394 (fix(thir): Include `NoneWithError` in Enum Struct Tail Assertion) - #153419 (rustc_llvm: add missing `-` to flag-comparison logic) - #153423 (Update dispatch2 to v0.3.1)
rust-timer
added a commit
that referenced
this pull request
Mar 5, 2026
Rollup merge of #153394 - TKanX:bugfix/153390-ice-enum-struct-syntax-error, r=dingxiangfei2009 fix(thir): Include `NoneWithError` in Enum Struct Tail Assertion ### Summary: Fixes the ICE triggered when a syntax error appears inside an enum variant struct literal. PR #153227 added `StructTailExpr::NoneWithError` and updated the `match base` arm in the `AdtKind::Enum` branch of `thir/cx/expr.rs`, but overlooked the `assert!(matches!(...))` guard preceding it, which still only listed `None | DefaultFields(_)`. Closes #153390 r? @dingxiangfei2009 cc @matthiaskrgr
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
Fixes the ICE triggered when a syntax error appears inside an enum variant struct literal.
PR #153227 added
StructTailExpr::NoneWithErrorand updated thematch basearm in theAdtKind::Enumbranch ofthir/cx/expr.rs, but overlooked theassert!(matches!(...))guard preceding it, which still only listedNone | DefaultFields(_).Closes #153390
r? @dingxiangfei2009
cc @matthiaskrgr