We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
This compiles and runs:
let mut v = vec![0i]; let f = |i: uint| v.get_mut(i); let x = f(0); let y = f(0); (*x,*y)
x and y are not supposed to live at the same time. Results in an UB (in a more complex case) Rust:
x
y
rustc 0.12.0-nightly (af3889f 2014-09-18 21:20:38 +0000)