]> git.lizzy.rs Git - rust.git/blob - tests/ui/liveness/liveness-move-in-loop.rs
Rollup merge of #104965 - zacklukem:p-option-as_ref-docs, r=scottmcm
[rust.git] / tests / ui / liveness / liveness-move-in-loop.rs
1 fn main() {
2
3     let y: Box<isize> = 42.into();
4     let mut x: Box<isize>;
5
6     loop {
7         println!("{}", y);
8         loop {
9             loop {
10                 loop {
11                     x = y; //~ ERROR use of moved value
12                     x.clone();
13                 }
14             }
15         }
16     }
17 }