mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
fed3c49695
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 rust-lang/rust#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 rust-lang/rust#153390 r? @dingxiangfei2009 cc @matthiaskrgr