1 error[E0509]: cannot move out of type `S`, which implements the `Drop` trait
2 --> $DIR/borrowck-move-out-of-struct-with-dtor.rs:9:11
4 LL | match (S {f:"foo".to_string()}) {
5 | ^^^^^^^^^^^^^^^^^^^^^^^^^ cannot move out of here
11 | move occurs because `_s` has type `String`, which does not implement the `Copy` trait
13 help: consider borrowing the pattern binding
15 LL | S {f:ref _s} => {}
18 error[E0509]: cannot move out of type `S`, which implements the `Drop` trait
19 --> $DIR/borrowck-move-out-of-struct-with-dtor.rs:16:20
21 LL | let S {f:_s} = S {f:"foo".to_string()};
22 | -- ^^^^^^^^^^^^^^^^^^^^^^^ cannot move out of here
25 | move occurs because `_s` has type `String`, which does not implement the `Copy` trait
27 help: consider borrowing the pattern binding
29 LL | let S {f:ref _s} = S {f:"foo".to_string()};
32 error[E0509]: cannot move out of type `S`, which implements the `Drop` trait
33 --> $DIR/borrowck-move-out-of-struct-with-dtor.rs:20:19
35 LL | fn move_in_fn_arg(S {f:_s}: S) {
39 | | move occurs because `_s` has type `String`, which does not implement the `Copy` trait
40 | cannot move out of here
42 help: consider borrowing the pattern binding
44 LL | fn move_in_fn_arg(S {f:ref _s}: S) {
47 error: aborting due to 3 previous errors
49 For more information about this error, try `rustc --explain E0509`.