]> git.proxmox.com Git - rustc.git/blame - src/test/ui/error-codes/E0007.stderr
New upstream version 1.48.0~beta.8+dfsg1
[rustc.git] / src / test / ui / error-codes / E0007.stderr
CommitLineData
2c00a5a8 1error[E0007]: cannot bind by-move with sub-bindings
dfeec247 2 --> $DIR/E0007.rs:6:9
2c00a5a8 3 |
0531ce1d 4LL | op_string @ Some(s) => {},
2c00a5a8
XL
5 | ^^^^^^^^^^^^^^^^^^^ binds an already bound by-move value by moving it
6
48663c56 7error[E0382]: use of moved value
dfeec247 8 --> $DIR/E0007.rs:6:26
48663c56
XL
9 |
10LL | let x = Some("s".to_string());
1b1a35ee 11 | - move occurs because `x` has type `Option<String>`, which does not implement the `Copy` trait
48663c56
XL
12LL | match x {
13LL | op_string @ Some(s) => {},
14 | -----------------^-
15 | | |
16 | | value used here after move
17 | value moved here
18
dfeec247 19error: aborting due to 2 previous errors
2c00a5a8 20
dfeec247 21Some errors have detailed explanations: E0007, E0382.
0531ce1d 22For more information about an error, try `rustc --explain E0007`.