rust/tests/ui/issues/issue-46471-1.rs

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

9 lines
150 B
Rust
Raw Normal View History

fn main() {
let y = {
let mut z = 0;
&mut z
};
2019-05-02 22:34:15 +00:00
//~^^ ERROR `z` does not live long enough [E0597]
println!("{}", y);
}