mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 06:51:58 +00:00
14 lines
365 B
Rust
14 lines
365 B
Rust
fn main() {
|
|
|
|
let y: Box<isize> = 42.into();
|
|
let mut x: Box<isize>;
|
|
|
|
loop {
|
|
println!("{}", y); //~ ERROR borrow of moved value: `y`
|
|
while true { while true { while true { x = y; x.clone(); } } }
|
|
//~^ WARN denote infinite loops with
|
|
//~| WARN denote infinite loops with
|
|
//~| WARN denote infinite loops with
|
|
}
|
|
}
|