rust/tests/ui/unsized-locals/borrow-after-move.stderr
2025-06-13 01:16:36 +02:00

32 lines
1.1 KiB
Plaintext

error[E0277]: the size for values of type `str` cannot be known at compilation time
--> $DIR/borrow-after-move.rs:18:13
|
LL | let y = *x;
| ^ doesn't have a size known at compile-time
|
= help: the trait `Sized` is not implemented for `str`
= note: all local variables must have a statically known size
help: references are always `Sized`, even if they point to unsized data; consider not dereferencing the expression
|
LL - let y = *x;
LL + let y = x;
|
error[E0277]: the size for values of type `str` cannot be known at compilation time
--> $DIR/borrow-after-move.rs:26:13
|
LL | let y = *x;
| ^ doesn't have a size known at compile-time
|
= help: the trait `Sized` is not implemented for `str`
= note: all local variables must have a statically known size
help: references are always `Sized`, even if they point to unsized data; consider not dereferencing the expression
|
LL - let y = *x;
LL + let y = x;
|
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0277`.