]> git.lizzy.rs Git - rust.git/blob - src/test/ui/liveness/liveness-move-in-while.rs
Rollup merge of #75377 - canova:map_debug_impl, r=dtolnay
[rust.git] / src / test / ui / liveness / liveness-move-in-while.rs
1 #![feature(box_syntax)]
2
3 fn main() {
4     let y: Box<isize> = box 42;
5     let mut x: Box<isize>;
6     loop {
7         println!("{}", y); //~ ERROR borrow of moved value: `y`
8         while true { while true { while true { x = y; x.clone(); } } }
9         //~^ WARN denote infinite loops with
10         //~| WARN denote infinite loops with
11         //~| WARN denote infinite loops with
12     }
13 }