]> git.lizzy.rs Git - rust.git/blob - tests/ui/consts/const-unsized.stderr
Rollup merge of #107058 - clubby789:eqeq-homoglyph, r=wesleywiser
[rust.git] / tests / ui / consts / const-unsized.stderr
1 error[E0277]: the size for values of type `(dyn Debug + Sync + 'static)` cannot be known at compilation time
2   --> $DIR/const-unsized.rs:3:16
3    |
4 LL | const CONST_0: dyn Debug + Sync = *(&0 as &(dyn Debug + Sync));
5    |                ^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
6    |
7    = help: the trait `Sized` is not implemented for `(dyn Debug + Sync + 'static)`
8
9 error[E0277]: the size for values of type `str` cannot be known at compilation time
10   --> $DIR/const-unsized.rs:6:18
11    |
12 LL | const CONST_FOO: str = *"foo";
13    |                  ^^^ doesn't have a size known at compile-time
14    |
15    = help: the trait `Sized` is not implemented for `str`
16
17 error[E0277]: the size for values of type `(dyn Debug + Sync + 'static)` cannot be known at compilation time
18   --> $DIR/const-unsized.rs:9:18
19    |
20 LL | static STATIC_1: dyn Debug + Sync = *(&1 as &(dyn Debug + Sync));
21    |                  ^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
22    |
23    = help: the trait `Sized` is not implemented for `(dyn Debug + Sync + 'static)`
24
25 error[E0277]: the size for values of type `str` cannot be known at compilation time
26   --> $DIR/const-unsized.rs:12:20
27    |
28 LL | static STATIC_BAR: str = *"bar";
29    |                    ^^^ doesn't have a size known at compile-time
30    |
31    = help: the trait `Sized` is not implemented for `str`
32
33 error: aborting due to 4 previous errors
34
35 For more information about this error, try `rustc --explain E0277`.