fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error[E0382]: use of moved value: `m` 2 --> $DIR/issue-53114-borrow-checks.rs:22:11 3 | 4LL | let m = M; 5 | - move occurs because `m` has type `M`, which does not implement the `Copy` trait 6LL | drop(m); 7 | - value moved here 8LL | match m { _ => { } } // #53114: should eventually be accepted too 9 | ^ value used here after move 10 11error[E0382]: use of partially moved value: `mm` 12 --> $DIR/issue-53114-borrow-checks.rs:27:11 13 | 14LL | match mm { (_x, _) => { } } 15 | -- value partially moved here 16LL | match mm { (_, _y) => { } } 17 | ^^ value used here after partial move 18 | 19 = note: partial move occurs because `mm.0` has type `M`, which does not implement the `Copy` trait 20help: borrow this binding in the pattern to avoid moving the value 21 | 22LL | match mm { (ref _x, _) => { } } 23 | +++ 24 25error[E0382]: use of partially moved value: `mm` 26 --> $DIR/issue-53114-borrow-checks.rs:29:11 27 | 28LL | match mm { (_, _y) => { } } 29 | -- value partially moved here 30LL | 31LL | match mm { (_, _) => { } } 32 | ^^ value used here after partial move 33 | 34 = note: partial move occurs because `mm.1` has type `M`, which does not implement the `Copy` trait 35help: borrow this binding in the pattern to avoid moving the value 36 | 37LL | match mm { (_, ref _y) => { } } 38 | +++ 39 40error[E0382]: use of moved value: `m` 41 --> $DIR/issue-53114-borrow-checks.rs:36:16 42 | 43LL | let m = M; 44 | - move occurs because `m` has type `M`, which does not implement the `Copy` trait 45LL | drop(m); 46 | - value moved here 47LL | if let _ = m { } // #53114: should eventually be accepted too 48 | ^ value used here after move 49 50error[E0382]: use of partially moved value: `mm` 51 --> $DIR/issue-53114-borrow-checks.rs:41:22 52 | 53LL | if let (_x, _) = mm { } 54 | -- value partially moved here 55LL | if let (_, _y) = mm { } 56 | ^^ value used here after partial move 57 | 58 = note: partial move occurs because `mm.0` has type `M`, which does not implement the `Copy` trait 59help: borrow this binding in the pattern to avoid moving the value 60 | 61LL | if let (ref _x, _) = mm { } 62 | +++ 63 64error[E0382]: use of partially moved value: `mm` 65 --> $DIR/issue-53114-borrow-checks.rs:43:21 66 | 67LL | if let (_, _y) = mm { } 68 | -- value partially moved here 69LL | 70LL | if let (_, _) = mm { } 71 | ^^ value used here after partial move 72 | 73 = note: partial move occurs because `mm.1` has type `M`, which does not implement the `Copy` trait 74help: borrow this binding in the pattern to avoid moving the value 75 | 76LL | if let (_, ref _y) = mm { } 77 | +++ 78 79error: aborting due to 6 previous errors 80 81For more information about this error, try `rustc --explain E0382`.