rust/src/test/compile-fail/unsafe-alt.rs
2012-03-26 18:35:18 -07:00

9 lines
197 B
Rust

// error-pattern:invalidate reference i
enum foo { left({mut x: int}), right(bool) }
fn main() {
let x = left({mut x: 10});
alt x { left(i) { x = right(false); log(debug, i); } _ { } }
}