]> git.lizzy.rs Git - rust.git/blob - src/test/ui/nll/issue-46036.rs
Rollup merge of #103644 - catlee:catlee/option-question-mark-docs, r=workingjubilee
[rust.git] / src / test / ui / nll / issue-46036.rs
1 // Issue 46036: [NLL] false edges on infinite loops
2 // Infinite loops should create false edges to the cleanup block.
3
4 struct Foo { x: &'static u32 }
5
6 fn foo() {
7     let a = 3;
8     let foo = Foo { x: &a }; //~ ERROR E0597
9     loop { }
10 }
11
12 fn main() { }