mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 15:23:46 +00:00
13 lines
252 B
Rust
13 lines
252 B
Rust
// Issue 46036: [NLL] false edges on infinite loops
|
|
// Infinite loops should create false edges to the cleanup block.
|
|
|
|
struct Foo { x: &'static u32 }
|
|
|
|
fn foo() {
|
|
let a = 3;
|
|
let foo = Foo { x: &a }; //~ ERROR E0597
|
|
loop { }
|
|
}
|
|
|
|
fn main() { }
|