]> git.proxmox.com Git - rustc.git/blame - src/test/ui/consts/const-unsized.stderr
New upstream version 1.31.0~beta.4+dfsg1
[rustc.git] / src / test / ui / consts / const-unsized.stderr
CommitLineData
8faf50e0 1error[E0277]: the size for values of type `(dyn std::fmt::Debug + std::marker::Sync + 'static)` cannot be known at compilation time
0bf4aa26 2 --> $DIR/const-unsized.rs:13:16
ff7c6d11 3 |
0531ce1d 4LL | const CONST_0: Debug+Sync = *(&0 as &(Debug+Sync));
0bf4aa26 5 | ^^^^^^^^^^ doesn't have a size known at compile-time
ff7c6d11 6 |
8faf50e0 7 = help: the trait `std::marker::Sized` is not implemented for `(dyn std::fmt::Debug + std::marker::Sync + 'static)`
b7449926 8 = note: to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
ff7c6d11 9
8faf50e0 10error[E0277]: the size for values of type `str` cannot be known at compilation time
0bf4aa26 11 --> $DIR/const-unsized.rs:16:18
ff7c6d11 12 |
0531ce1d 13LL | const CONST_FOO: str = *"foo";
0bf4aa26 14 | ^^^ doesn't have a size known at compile-time
ff7c6d11
XL
15 |
16 = help: the trait `std::marker::Sized` is not implemented for `str`
b7449926 17 = note: to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
ff7c6d11 18
8faf50e0 19error[E0277]: the size for values of type `(dyn std::fmt::Debug + std::marker::Sync + 'static)` cannot be known at compilation time
0bf4aa26 20 --> $DIR/const-unsized.rs:19:18
ff7c6d11 21 |
0531ce1d 22LL | static STATIC_1: Debug+Sync = *(&1 as &(Debug+Sync));
0bf4aa26 23 | ^^^^^^^^^^ doesn't have a size known at compile-time
ff7c6d11 24 |
8faf50e0 25 = help: the trait `std::marker::Sized` is not implemented for `(dyn std::fmt::Debug + std::marker::Sync + 'static)`
b7449926 26 = note: to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
ff7c6d11 27
8faf50e0 28error[E0277]: the size for values of type `str` cannot be known at compilation time
0bf4aa26 29 --> $DIR/const-unsized.rs:22:20
ff7c6d11 30 |
0531ce1d 31LL | static STATIC_BAR: str = *"bar";
0bf4aa26 32 | ^^^ doesn't have a size known at compile-time
ff7c6d11
XL
33 |
34 = help: the trait `std::marker::Sized` is not implemented for `str`
b7449926 35 = note: to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
ff7c6d11
XL
36
37error: aborting due to 4 previous errors
38
0531ce1d 39For more information about this error, try `rustc --explain E0277`.