fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error[E0382]: use of partially moved value: `s` 2 --> $DIR/move-in-pattern-mut.rs:18:9 3 | 4LL | if let Some(mut x) = s { 5 | ----- value partially moved here 6... 7LL | foo(s); 8 | ^ value used here after partial move 9 | 10 = note: partial move occurs because value has type `S`, which does not implement the `Copy` trait 11help: borrow this binding in the pattern to avoid moving the value 12 | 13LL | if let Some(ref mut x) = s { 14 | +++ 15 16error[E0382]: use of partially moved value: `e` 17 --> $DIR/move-in-pattern-mut.rs:22:9 18 | 19LL | let E::V { s: mut x } = e; 20 | ----- value partially moved here 21LL | x = S; 22LL | bar(e); 23 | ^ value used here after partial move 24 | 25 = note: partial move occurs because value has type `S`, which does not implement the `Copy` trait 26help: borrow this binding in the pattern to avoid moving the value 27 | 28LL | let E::V { s: ref mut x } = e; 29 | +++ 30 31error: aborting due to 2 previous errors 32 33For more information about this error, try `rustc --explain E0382`.