rust/tests/ui/consts/dont-ctfe-unsized-initializer.stderr
2025-03-03 23:09:42 +00:00

22 lines
828 B
Plaintext

error[E0277]: the size for values of type `str` cannot be known at compilation time
--> $DIR/dont-ctfe-unsized-initializer.rs:1:11
|
LL | static S: str = todo!();
| ^^^ doesn't have a size known at compile-time
|
= help: the trait `Sized` is not implemented for `str`
= note: statics and constants must have a statically known size
error[E0277]: the size for values of type `str` cannot be known at compilation time
--> $DIR/dont-ctfe-unsized-initializer.rs:4:10
|
LL | const C: str = todo!();
| ^^^ doesn't have a size known at compile-time
|
= help: the trait `Sized` is not implemented for `str`
= note: statics and constants must have a statically known size
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0277`.