summary refs log tree commit diff
path: root/src/test/ui/error-codes/E0007.stderr
blob: 31af9171725bb5983a6190709d67e1924d7f4d68 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
error[E0007]: cannot bind by-move with sub-bindings
  --> $DIR/E0007.rs:6:9
   |
LL |         op_string @ Some(s) => {},
   |         ^^^^^^^^^^^^^^^^^^^ binds an already bound by-move value by moving it

error[E0382]: use of moved value
  --> $DIR/E0007.rs:6:26
   |
LL |     let x = Some("s".to_string());
   |         - move occurs because `x` has type `std::option::Option<std::string::String>`, which does not implement the `Copy` trait
LL |     match x {
LL |         op_string @ Some(s) => {},
   |         -----------------^-
   |         |                |
   |         |                value used here after move
   |         value moved here

error: aborting due to 2 previous errors

Some errors have detailed explanations: E0007, E0382.
For more information about an error, try `rustc --explain E0007`.