rust/src/test/compile-fail/resolve-inconsistent-names.rs

8 lines
206 B
Rust
Raw Normal View History

fn main() {
let y = 1;
alt y {
a | b => {} //~ ERROR variable `a` from pattern #1 is not bound in pattern #2
//~^ ERROR variable `b` from pattern #2 is not bound in pattern #1
}
}