summary refs log tree commit diff
path: root/src/test/ui/issues/issue-46036.rs
blob: c517bbe57e82be38f563cc716cf9c8e23db6ba8e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// Issue 46036: [NLL] false edges on infinite loops
// Infinite loops should create false edges to the cleanup block.
#![feature(nll)]

struct Foo { x: &'static u32 }

fn foo() {
    let a = 3;
    let foo = Foo { x: &a }; //~ ERROR E0597
    loop { }
}

fn main() { }