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