1 warning: the feature `unsized_locals` is incomplete and may not be safe to use and/or cause compiler crashes
2 --> $DIR/borrow-after-move.rs:1:12
4 LL | #![feature(unsized_locals, unsized_fn_params)]
7 = note: see issue #48055 <https://github.com/rust-lang/rust/issues/48055> for more information
8 = note: `#[warn(incomplete_features)]` on by default
10 error[E0382]: borrow of moved value: `x`
11 --> $DIR/borrow-after-move.rs:21:24
16 LL | println!("{}", &x);
17 | ^^ value borrowed here after move
19 = note: move occurs because `*x` has type `str`, which does not implement the `Copy` trait
21 error[E0382]: borrow of moved value: `y`
22 --> $DIR/borrow-after-move.rs:23:24
25 | - move occurs because `y` has type `str`, which does not implement the `Copy` trait
29 LL | println!("{}", &y);
30 | ^^ value borrowed here after move
32 note: consider changing this parameter type in function `drop_unsized` to borrow instead if owning the value isn't necessary
33 --> $DIR/borrow-after-move.rs:14:31
35 LL | fn drop_unsized<T: ?Sized>(_: T) {}
36 | ------------ ^ this parameter takes ownership of the value
40 error[E0382]: borrow of moved value: `x`
41 --> $DIR/borrow-after-move.rs:31:24
46 LL | println!("{}", &x);
47 | ^^ value borrowed here after move
49 = note: move occurs because `*x` has type `str`, which does not implement the `Copy` trait
51 error[E0382]: borrow of moved value: `y`
52 --> $DIR/borrow-after-move.rs:33:24
55 | - move occurs because `y` has type `str`, which does not implement the `Copy` trait
57 | ----- `y` moved due to this method call
59 LL | println!("{}", &y);
60 | ^^ value borrowed here after move
62 note: this function takes ownership of the receiver `self`, which moves `y`
63 --> $DIR/borrow-after-move.rs:5:12
65 LL | fn foo(self) -> String;
68 error[E0382]: borrow of moved value: `x`
69 --> $DIR/borrow-after-move.rs:40:24
71 LL | let x = "hello".to_owned().into_boxed_str();
72 | - move occurs because `x` has type `Box<str>`, which does not implement the `Copy` trait
75 LL | println!("{}", &x);
76 | ^^ value borrowed here after move
78 help: consider cloning the value if the performance cost is acceptable
83 error: aborting due to 5 previous errors; 1 warning emitted
85 For more information about this error, try `rustc --explain E0382`.