| 1 |
error[E0277]: the size for values of type `str` cannot be known at compilation time |
| 2 |
--> tests/compile_fail/static_is_sized.rs:4:1 |
| 3 |
| |
| 4 |
4 | / lazy_static! { |
| 5 |
5 | | pub static ref FOO: str = panic!(); |
| 6 |
6 | | } |
| 7 |
| |_^ doesn't have a size known at compile-time |
| 8 |
| |
| 9 |
= help: the trait `Sized` is not implemented for `str` |
| 10 |
note: required by an implicit `Sized` bound in `Lazy` |
| 11 |
--> src/inline_lazy.rs |
| 12 |
| |
| 13 |
| pub struct Lazy<T: Sync>(Cell<MaybeUninit<T>>, Once); |
| 14 |
| ^ required by the implicit `Sized` requirement on this type parameter in `Lazy` |
| 15 |
= note: this error originates in the macro `__lazy_static_create` which comes from the expansion of the macro `lazy_static` (in Nightly builds, run with -Z macro-backtrace for more info) |
| 16 |
|
| 17 |
error[E0277]: the size for values of type `str` cannot be known at compilation time |
| 18 |
--> tests/compile_fail/static_is_sized.rs:4:1 |
| 19 |
| |
| 20 |
4 | / lazy_static! { |
| 21 |
5 | | pub static ref FOO: str = panic!(); |
| 22 |
6 | | } |
| 23 |
| |_^ doesn't have a size known at compile-time |
| 24 |
| |
| 25 |
= help: the trait `Sized` is not implemented for `str` |
| 26 |
note: required by an implicit `Sized` bound in `Lazy` |
| 27 |
--> src/inline_lazy.rs |
| 28 |
| |
| 29 |
| pub struct Lazy<T: Sync>(Cell<MaybeUninit<T>>, Once); |
| 30 |
| ^ required by the implicit `Sized` requirement on this type parameter in `Lazy` |
| 31 |
= note: this error originates in the macro `__lazy_static_create` which comes from the expansion of the macro `lazy_static` (in Nightly builds, run with -Z macro-backtrace for more info) |
| 32 |
|
| 33 |
error[E0277]: the size for values of type `str` cannot be known at compilation time |
| 34 |
--> tests/compile_fail/static_is_sized.rs:5:25 |
| 35 |
| |
| 36 |
5 | pub static ref FOO: str = panic!(); |
| 37 |
| ^^^ doesn't have a size known at compile-time |
| 38 |
| |
| 39 |
= help: the trait `Sized` is not implemented for `str` |
| 40 |
= note: the return type of a function must have a statically known size |
| 41 |
|
| 42 |
error[E0599]: the method `get` exists for struct `Lazy<str>`, but its trait bounds were not satisfied |
| 43 |
--> tests/compile_fail/static_is_sized.rs:4:1 |
| 44 |
| |
| 45 |
4 | / lazy_static! { |
| 46 |
5 | | pub static ref FOO: str = panic!(); |
| 47 |
6 | | } |
| 48 |
| |_^ method cannot be called on `Lazy<str>` due to unsatisfied trait bounds |
| 49 |
| |
| 50 |
= note: the following trait bounds were not satisfied: |
| 51 |
`str: Sized` |
| 52 |
= note: this error originates in the macro `__lazy_static_internal` which comes from the expansion of the macro `lazy_static` (in Nightly builds, run with -Z macro-backtrace for more info) |
| 53 |
|
| 54 |
error[E0277]: the size for values of type `str` cannot be known at compilation time |
| 55 |
--> tests/compile_fail/static_is_sized.rs:4:1 |
| 56 |
| |
| 57 |
4 | / lazy_static! { |
| 58 |
5 | | pub static ref FOO: str = panic!(); |
| 59 |
6 | | } |
| 60 |
| |_^ doesn't have a size known at compile-time |
| 61 |
| |
| 62 |
= help: the trait `Sized` is not implemented for `str` |
| 63 |
= note: the return type of a function must have a statically known size |
| 64 |
= note: this error originates in the macro `__lazy_static_internal` which comes from the expansion of the macro `lazy_static` (in Nightly builds, run with -Z macro-backtrace for more info) |