rust/src/test/ui/borrowck/borrowck-local-borrow.rs

12 lines
171 B
Rust
Raw Normal View History

2020-04-16 06:50:32 +00:00
// run-fail
// error-pattern:panic 1
// revisions: migrate mir
//[mir]compile-flags: -Z borrowck=mir
fn main() {
let x = 2;
let y = &x;
panic!("panic 1");
}