| error[E0277]: the size for values of type `(dyn Debug + Sync + 'static)` cannot be known at compilation time |
| --> $DIR/const-unsized.rs:3:16 |
| | |
| LL | const CONST_0: dyn Debug + Sync = *(&0 as &(dyn Debug + Sync)); |
| | ^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time |
| | |
| = help: the trait `Sized` is not implemented for `(dyn Debug + Sync + 'static)` |
| = 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/const-unsized.rs:7:18 |
| | |
| LL | const CONST_FOO: str = *"foo"; |
| | ^^^ 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 `(dyn Debug + Sync + 'static)` cannot be known at compilation time |
| --> $DIR/const-unsized.rs:11:1 |
| | |
| LL | static STATIC_1: dyn Debug + Sync = *(&1 as &(dyn Debug + Sync)); |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time |
| | |
| = help: the trait `Sized` is not implemented for `(dyn Debug + Sync + 'static)` |
| = 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/const-unsized.rs:14:1 |
| | |
| LL | static STATIC_BAR: str = *"bar"; |
| | ^^^^^^^^^^^^^^^^^^^^^^ 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[E0507]: cannot move out of a shared reference |
| --> $DIR/const-unsized.rs:3:35 |
| | |
| LL | const CONST_0: dyn Debug + Sync = *(&0 as &(dyn Debug + Sync)); |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ move occurs because value has type `dyn Debug + Sync`, which does not implement the `Copy` trait |
| |
| error[E0507]: cannot move out of a shared reference |
| --> $DIR/const-unsized.rs:7:24 |
| | |
| LL | const CONST_FOO: str = *"foo"; |
| | ^^^^^^ move occurs because value has type `str`, which does not implement the `Copy` trait |
| |
| error: aborting due to 6 previous errors |
| |
| Some errors have detailed explanations: E0277, E0507. |
| For more information about an error, try `rustc --explain E0277`. |