error[E0507]: cannot move out of borrowed content --> $DIR/borrowck-move-in-irrefut-pat.rs:16:13 | LL | fn arg_item(&_x: &String) {} | ^-- | || | |data moved here | cannot move out of borrowed content | help: consider removing the `&`: `_x` | note: move occurs because `_x` has type `std::string::String`, which does not implement the `Copy` trait --> $DIR/borrowck-move-in-irrefut-pat.rs:16:14 | LL | fn arg_item(&_x: &String) {} | ^^ error[E0507]: cannot move out of data in a `&` reference --> $DIR/borrowck-move-in-irrefut-pat.rs:16:14 | LL | fn arg_item(&_x: &String) {} | ^^ | | | cannot move out of data in a `&` reference | cannot move error[E0507]: cannot move out of borrowed content --> $DIR/borrowck-move-in-irrefut-pat.rs:21:11 | LL | with(|&_x| ()) | ^-- | || | |data moved here | cannot move out of borrowed content | help: consider removing the `&`: `_x` | note: move occurs because `_x` has type `std::string::String`, which does not implement the `Copy` trait --> $DIR/borrowck-move-in-irrefut-pat.rs:21:12 | LL | with(|&_x| ()) | ^^ error[E0507]: cannot move out of data in a `&` reference --> $DIR/borrowck-move-in-irrefut-pat.rs:21:12 | LL | with(|&_x| ()) | ^^ | | | cannot move out of data in a `&` reference | cannot move error[E0507]: cannot move out of data in a `&` reference --> $DIR/borrowck-move-in-irrefut-pat.rs:27:10 | LL | let &_x = &"hi".to_string(); | ^^ | | | cannot move out of data in a `&` reference | cannot move error[E0507]: cannot move out of borrowed content --> $DIR/borrowck-move-in-irrefut-pat.rs:27:15 | LL | let &_x = &"hi".to_string(); | --- ^^^^^^^^^^^^^^^^^ cannot move out of borrowed content | || | |data moved here | help: consider removing the `&`: `_x` | note: move occurs because `_x` has type `std::string::String`, which does not implement the `Copy` trait --> $DIR/borrowck-move-in-irrefut-pat.rs:27:10 | LL | let &_x = &"hi".to_string(); | ^^ error: aborting due to 6 previous errors For more information about this error, try `rustc --explain E0507`.