-
- Notifications
You must be signed in to change notification settings - Fork 14.2k
Closed
Labels
C-bugCategory: This is a bug.Category: This is a bug.F-loop_matchwhen you match up with someone and they really throw you for a loopwhen you match up with someone and they really throw you for a loopI-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
Basic Code
#![feature(loop_match)] #[unsafe(no_mangle)] pub fn break_on_constant_evalution() -> i32 { let mut state = 0; #[loop_match] 'a : loop { state = 'blk: { match state { 0 => { break 'a; }, _ => { const A: i32 = 0; #[const_continue] break 'blk /* constant evaluation */; } } } } state }- constant operation statment: https://godbolt.org/z/qcsKdqb7a (
expression is not a valid constant Binary) - const fn call: https://godbolt.org/z/dWaYoP9GE (
expression is not a valid constant Call) - const block: https://godbolt.org/z/zvs9ePzdj (
cycle detected when building MIR for break_on_constant_evalution)
Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.F-loop_matchwhen you match up with someone and they really throw you for a loopwhen you match up with someone and they really throw you for a loopI-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.