]> git.lizzy.rs Git - rust.git/blob - src/test/ui/borrowck/borrowck-drop-from-guard.stderr
Rollup merge of #57132 - daxpedda:master, r=steveklabnik
[rust.git] / src / test / ui / borrowck / borrowck-drop-from-guard.stderr
1 error[E0382]: use of moved value: `my_str`
2   --> $DIR/borrowck-drop-from-guard.rs:11:23
3    |
4 LL |         Some(_) if { drop(my_str); false } => {}
5    |                           ------ value moved here
6 LL |         Some(_) => {}
7 LL |         None => { foo(my_str); } //~ ERROR [E0382]
8    |                       ^^^^^^ value used here after move
9    |
10    = note: move occurs because `my_str` has type `std::string::String`, which does not implement the `Copy` trait
11
12 error: aborting due to previous error
13
14 For more information about this error, try `rustc --explain E0382`.