rust/tests/ui/consts/const-eval/stable-metric/evade-deduplication-issue-118612.rs
2024-09-23 13:41:15 -04:00

25 lines
496 B
Rust

//@ check-pass
//@ compile-flags: -Z tiny-const-eval-limit -Z deduplicate-diagnostics=yes
#![allow(long_running_const_eval)]
const FOO: () = {
let mut i = 0;
loop {
//~^ WARN is taking a long time
//~| WARN is taking a long time
//~| WARN is taking a long time
//~| WARN is taking a long time
//~| WARN is taking a long time
if i == 1000 {
break;
} else {
i += 1;
}
}
};
fn main() {
FOO
}