Files
rust/tests/ui/mir/unreachable-loop-jump-threading.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

11 lines
276 B
Rust
Raw Normal View History

//@ build-pass
2024-11-16 13:32:13 +01:00
//@ needs-rustc-debug-assertions
//@ compile-flags: -Zmir-enable-passes=+GVN -Zmir-enable-passes=+JumpThreading --crate-type=lib
pub fn fun(terminate: bool) {
while true {}
//~^ WARN denote infinite loops with `loop { ... }`
2024-11-16 13:32:13 +01:00
while !terminate {}
}