Commit Graph

10 Commits

Author SHA1 Message Date
bors
154037ffb8 Auto merge of #144783 - folkertdev:loop-match-diverging-loop, r=SparrowLii
fix `#[loop_match]` on diverging loop

tracking issue: https://github.com/rust-lang/rust/issues/132306

fixes https://github.com/rust-lang/rust/issues/144492
fixes https://github.com/rust-lang/rust/issues/144493

fixes https://github.com/rust-lang/rust/issues/144781

this generated invalid MIR before. issue https://github.com/rust-lang/rust/issues/143806 still has an issue where we assign `state = state` which is invalid in MIR. Fixing that problem is tricky, so I'd like to do that separately.

r? `@bjorn3`
2025-09-01 14:42:07 +00:00
Jonathan Brouwer
4bb7bf64e0 Update uitests
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
2025-08-14 18:18:42 +02:00
Folkert de Vries
9916ce362f fix #[loop_match] on diverging loop
this generated invalid MIR before
2025-08-04 19:23:10 +02:00
Folkert de Vries
040f71e812 loop match: error on #[const_continue] outside #[loop_match] 2025-08-01 00:28:52 +02:00
Shoyu Vanilla
d87b4f2c77 fix: Reject upvar scrutinees for loop_match 2025-07-28 22:24:58 +09:00
Folkert de Vries
730d33dd64 loop_match: suggest extracting to a const item
if the expression cannot be evaluated in a straightforward way
2025-07-26 00:10:56 +02:00
Folkert de Vries
6d58a88c3c loop_match: fix 'no terminator on block' 2025-07-07 13:55:40 +02:00
Folkert de Vries
8fdf0ef0ae loop match: handle opaque patterns
fixes issue 143203
2025-07-01 15:53:52 +02:00
Folkert de Vries
aa7cc5d2f4 loop match: run exhaustiveness check 2025-07-01 15:53:50 +02:00
bjorn3
ba5556d239 Add #[loop_match] for improved DFA codegen
Co-authored-by: Folkert de Vries <folkert@folkertdev.nl>
2025-06-23 20:43:04 +02:00