rust/src/test/compile-fail/unsafe-alt.rs

8 lines
166 B
Rust
Raw Normal View History

// error-pattern:invalidate alias i
2011-07-27 14:19:39 +02:00
tag foo { left(int); right(bool); }
fn main() {
2011-07-27 14:19:39 +02:00
let x = left(10);
alt x { left(i) { x = right(false); log i; } _ { } }
}