1 error[E0509]: cannot move out of type `S`, which implements the `Drop` trait
2 --> $DIR/borrowck-move-out-of-struct-with-dtor.rs:7:11
4 LL | match (S {f:"foo".to_string()}) {
5 | ^^^^^^^^^^^^^^^^^^^^^^^^^ cannot move out of here
10 note: move occurs because `_s` has type `std::string::String`, which does not implement the `Copy` trait
11 --> $DIR/borrowck-move-out-of-struct-with-dtor.rs:9:14
16 error[E0509]: cannot move out of type `S`, which implements the `Drop` trait
17 --> $DIR/borrowck-move-out-of-struct-with-dtor.rs:14:20
19 LL | let S {f:_s} = S {f:"foo".to_string()};
20 | -- ^^^^^^^^^^^^^^^^^^^^^^^ cannot move out of here
24 note: move occurs because `_s` has type `std::string::String`, which does not implement the `Copy` trait
25 --> $DIR/borrowck-move-out-of-struct-with-dtor.rs:14:14
27 LL | let S {f:_s} = S {f:"foo".to_string()};
30 error[E0509]: cannot move out of type `S`, which implements the `Drop` trait
31 --> $DIR/borrowck-move-out-of-struct-with-dtor.rs:18:19
33 LL | fn move_in_fn_arg(S {f:_s}: S) {
37 | cannot move out of here
39 note: move occurs because `_s` has type `std::string::String`, which does not implement the `Copy` trait
40 --> $DIR/borrowck-move-out-of-struct-with-dtor.rs:18:24
42 LL | fn move_in_fn_arg(S {f:_s}: S) {
45 error: aborting due to 3 previous errors
47 For more information about this error, try `rustc --explain E0509`.