rust/src/test/compile-fail/borrowck-issue-2657-2.rs

15 lines
192 B
Rust
Raw Normal View History

//xfail-test
// this should be illegal but borrowck is not handling
// pattern bindings correctly right now
fn main() {
let x = some(~1);
alt x {
some(y) {
let b <- y;
}
_ {}
}
}