]>
Commit | Line | Data |
---|---|---|
2c00a5a8 | 1 | error[E0007]: cannot bind by-move with sub-bindings |
dfeec247 | 2 | --> $DIR/E0007.rs:6:9 |
2c00a5a8 | 3 | | |
0531ce1d | 4 | LL | op_string @ Some(s) => {}, |
2c00a5a8 XL |
5 | | ^^^^^^^^^^^^^^^^^^^ binds an already bound by-move value by moving it |
6 | ||
48663c56 | 7 | error[E0382]: use of moved value |
dfeec247 | 8 | --> $DIR/E0007.rs:6:26 |
48663c56 XL |
9 | | |
10 | LL | 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 |
12 | LL | match x { |
13 | LL | op_string @ Some(s) => {}, | |
14 | | -----------------^- | |
15 | | | | | |
16 | | | value used here after move | |
17 | | value moved here | |
18 | ||
dfeec247 | 19 | error: aborting due to 2 previous errors |
2c00a5a8 | 20 | |
dfeec247 | 21 | Some errors have detailed explanations: E0007, E0382. |
0531ce1d | 22 | For more information about an error, try `rustc --explain E0007`. |