1 warning: denote infinite loops with `loop { ... }`
2 --> $DIR/liveness-move-in-while.rs:8:9
4 LL | while true { while true { while true { x = y; x.clone(); } } }
5 | ^^^^^^^^^^ help: use `loop`
7 = note: `#[warn(while_true)]` on by default
9 warning: denote infinite loops with `loop { ... }`
10 --> $DIR/liveness-move-in-while.rs:8:22
12 LL | while true { while true { while true { x = y; x.clone(); } } }
13 | ^^^^^^^^^^ help: use `loop`
15 warning: denote infinite loops with `loop { ... }`
16 --> $DIR/liveness-move-in-while.rs:8:35
18 LL | while true { while true { while true { x = y; x.clone(); } } }
19 | ^^^^^^^^^^ help: use `loop`
21 error[E0382]: borrow of moved value: `y`
22 --> $DIR/liveness-move-in-while.rs:7:24
24 LL | let y: Box<isize> = 42.into();
25 | - move occurs because `y` has type `Box<isize>`, which does not implement the `Copy` trait
28 | ---- inside of this loop
29 LL | println!("{}", y);
30 | ^ value borrowed here after move
31 LL | while true { while true { while true { x = y; x.clone(); } } }
32 | ---------- ---------- ---------- - value moved here, in previous iteration of loop
34 | | | inside of this loop
35 | | inside of this loop
38 = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
39 help: consider cloning the value if the performance cost is acceptable
41 LL | while true { while true { while true { x = y.clone(); x.clone(); } } }
44 error: aborting due to previous error; 3 warnings emitted
46 For more information about this error, try `rustc --explain E0382`.