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:
rustc 0.12.0-nightly (af3889f 2014-09-18 21:20:38 +0000)