|
| 1 | +error[E0277]: the size for values of type `str` cannot be known at compilation time |
| 2 | + --> $DIR/unsized_type2.rs:14:24 |
| 3 | + | |
| 4 | +LL | pub static WITH_ERROR: Foo = Foo { version: 0 }; |
| 5 | + | ^^^ doesn't have a size known at compile-time |
| 6 | + | |
| 7 | + = help: within `Foo`, the trait `Sized` is not implemented for `str`, which is required by `Foo: Sized` |
| 8 | +note: required because it appears within the type `Foo` |
| 9 | + --> $DIR/unsized_type2.rs:5:12 |
| 10 | + | |
| 11 | +LL | pub struct Foo { |
| 12 | + | ^^^ |
| 13 | + |
| 14 | +error[E0277]: the size for values of type `str` cannot be known at compilation time |
| 15 | + --> $DIR/unsized_type2.rs:14:30 |
| 16 | + | |
| 17 | +LL | pub static WITH_ERROR: Foo = Foo { version: 0 }; |
| 18 | + | ^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time |
| 19 | + | |
| 20 | + = help: within `Foo`, the trait `Sized` is not implemented for `str`, which is required by `Foo: Sized` |
| 21 | +note: required because it appears within the type `Foo` |
| 22 | + --> $DIR/unsized_type2.rs:5:12 |
| 23 | + | |
| 24 | +LL | pub struct Foo { |
| 25 | + | ^^^ |
| 26 | + = note: constant expressions must have a statically known size |
| 27 | + |
| 28 | +error[E0308]: mismatched types |
| 29 | + --> $DIR/unsized_type2.rs:14:45 |
| 30 | + | |
| 31 | +LL | pub static WITH_ERROR: Foo = Foo { version: 0 }; |
| 32 | + | ^ expected `str`, found integer |
| 33 | + |
| 34 | +error: aborting due to 3 previous errors |
| 35 | + |
| 36 | +Some errors have detailed explanations: E0277, E0308. |
| 37 | +For more information about an error, try `rustc --explain E0277`. |
0 commit comments