fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error[E0382]: use of moved value: `x` 2 --> $DIR/move-guard-if-let-chain.rs:12:27 3 | 4LL | let x: Box<_> = Box::new(1); 5 | - move occurs because `x` has type `Box<i32>`, which does not implement the `Copy` trait 6... 7LL | (1, 2) if let y = x && c => (), 8 | - value moved here 9LL | (1, 2) if let z = x => (), 10 | ^ value used here after move 11 | 12help: borrow this binding in the pattern to avoid moving the value 13 | 14LL | (1, 2) if let ref y = x && c => (), 15 | +++ 16 17error[E0382]: use of moved value: `x` 18 --> $DIR/move-guard-if-let-chain.rs:36:27 19 | 20LL | let x: Box<_> = Box::new(1); 21 | - move occurs because `x` has type `Box<i32>`, which does not implement the `Copy` trait 22... 23LL | (1, _) if let y = x && c => (), 24 | - value moved here 25LL | (_, 2) if let z = x => (), 26 | ^ value used here after move 27 | 28help: borrow this binding in the pattern to avoid moving the value 29 | 30LL | (1, _) if let ref y = x && c => (), 31 | +++ 32 33error[E0382]: use of moved value: `x` 34 --> $DIR/move-guard-if-let-chain.rs:59:36 35 | 36LL | let x: Box<_> = Box::new(1); 37 | - move occurs because `x` has type `Box<i32>`, which does not implement the `Copy` trait 38... 39LL | (1, _) | (_, 2) if let y = x && c => (), 40 | - ^ value used here after move 41 | | 42 | value moved here 43 | 44help: borrow this binding in the pattern to avoid moving the value 45 | 46LL | (1, _) | (_, 2) if let ref y = x && c => (), 47 | +++ 48 49error[E0382]: use of moved value: `x` 50 --> $DIR/move-guard-if-let-chain.rs:82:16 51 | 52LL | let x: Box<_> = Box::new(1); 53 | - move occurs because `x` has type `Box<i32>`, which does not implement the `Copy` trait 54... 55LL | (1, 2) if let y = x && c => false, 56 | - value moved here 57LL | _ => { *x == 1 }, 58 | ^^ value used here after move 59 | 60help: borrow this binding in the pattern to avoid moving the value 61 | 62LL | (1, 2) if let ref y = x && c => false, 63 | +++ 64 65error: aborting due to 4 previous errors 66 67For more information about this error, try `rustc --explain E0382`.