1 error[E0382]: borrow of moved value: `x`
2 --> $DIR/borrow-after-move.rs:20:24
7 LL | println!("{}", &x);
8 | ^^ value borrowed here after move
10 = note: move occurs because `*x` has type `str`, which does not implement the `Copy` trait
12 error[E0382]: borrow of moved value: `y`
13 --> $DIR/borrow-after-move.rs:22:24
16 | - move occurs because `y` has type `str`, which does not implement the `Copy` trait
20 LL | println!("{}", &y);
21 | ^^ value borrowed here after move
23 error[E0382]: borrow of moved value: `x`
24 --> $DIR/borrow-after-move.rs:30:24
29 LL | println!("{}", &x);
30 | ^^ value borrowed here after move
32 = note: move occurs because `*x` has type `str`, which does not implement the `Copy` trait
34 error[E0382]: borrow of moved value: `y`
35 --> $DIR/borrow-after-move.rs:32:24
38 | - move occurs because `y` has type `str`, which does not implement the `Copy` trait
40 | ----- `y` moved due to this method call
42 LL | println!("{}", &y);
43 | ^^ value borrowed here after move
45 note: this function consumes the receiver `self` by taking ownership of it, which moves `y`
46 --> $DIR/borrow-after-move.rs:4:12
48 LL | fn foo(self) -> String;
51 error[E0382]: borrow of moved value: `x`
52 --> $DIR/borrow-after-move.rs:39:24
54 LL | let x = "hello".to_owned().into_boxed_str();
55 | - move occurs because `x` has type `std::boxed::Box<str>`, which does not implement the `Copy` trait
58 LL | println!("{}", &x);
59 | ^^ value borrowed here after move
61 error: aborting due to 5 previous errors
63 For more information about this error, try `rustc --explain E0382`.