rust/src/test/compile-fail/regions-blk.rs
2012-07-13 10:20:50 -07:00

15 lines
229 B
Rust

fn foo(cond: bool) {
let x = 5;
let mut y: &blk/int = &x;
let mut z: &blk/int;
if cond {
z = &x;
} else {
let w: &blk/int = &x;
z = w; //~ ERROR mismatched types
}
}
fn main() {
}