fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
704 B20 linesraw
1error[E0509]: cannot move out of type `X`, which implements the `Drop` trait
2  --> $DIR/disallowed-deconstructing-destructing-struct-match.rs:15:11
3   |
4LL |     match x {
5   |           ^ cannot move out of here
6LL |
7LL |         X { x: y } => println!("contents: {}", y)
8   |                -
9   |                |
10   |                data moved here
11   |                move occurs because `y` has type `String`, which does not implement the `Copy` trait
12   |
13help: consider borrowing the pattern binding
14   |
15LL |         X { x: ref y } => println!("contents: {}", y)
16   |                +++
17
18error: aborting due to previous error
19
20For more information about this error, try `rustc --explain E0509`.