rust/src/test/compile-fail/cap-clause-use-after-move.rs
2012-05-07 13:22:42 -07:00

8 lines
176 B
Rust

// error-pattern:Unsatisfied precondition constraint
fn main() {
let x = 5;
let _y = fn~(move x) { };
let _z = x; //< error: Unsatisfied precondition constraint
}