rust/src/test/run-fail/borrowck-wg-fail-3.rs
2013-04-30 16:35:01 -04:00

10 lines
114 B
Rust

// error-pattern:borrowed
fn main() {
let x = @mut 3;
let y: &mut int = x;
let z = x;
*z = 5;
}