|
1 | | -error[E0080]: `extern type` does not have known layout |
2 | | - --> $DIR/const-size_of_val-align_of_val-extern-type.rs:10:31 |
| 1 | +error[E0277]: the size for values of type `Opaque` cannot be known |
| 2 | + --> $DIR/const-size_of_val-align_of_val-extern-type.rs:10:43 |
3 | 3 | | |
4 | 4 | LL | const _SIZE: usize = unsafe { size_of_val(&4 as *const i32 as *const Opaque) }; |
5 | | - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of `_SIZE` failed here |
| 5 | + | ----------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a known size |
| 6 | + | | |
| 7 | + | required by a bound introduced by this call |
| 8 | + | |
| 9 | + = help: the trait `MetaSized` is not implemented for `Opaque` |
| 10 | +note: required by a bound in `std::intrinsics::size_of_val` |
| 11 | + --> $SRC_DIR/core/src/intrinsics/mod.rs:LL:COL |
6 | 12 |
|
7 | | -error[E0080]: `extern type` does not have known layout |
8 | | - --> $DIR/const-size_of_val-align_of_val-extern-type.rs:11:32 |
| 13 | +error[E0277]: the size for values of type `Opaque` cannot be known |
| 14 | + --> $DIR/const-size_of_val-align_of_val-extern-type.rs:12:45 |
9 | 15 | | |
10 | 16 | LL | const _ALIGN: usize = unsafe { align_of_val(&4 as *const i32 as *const Opaque) }; |
11 | | - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of `_ALIGN` failed here |
| 17 | + | ------------ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a known size |
| 18 | + | | |
| 19 | + | required by a bound introduced by this call |
| 20 | + | |
| 21 | + = help: the trait `MetaSized` is not implemented for `Opaque` |
| 22 | +note: required by a bound in `std::intrinsics::align_of_val` |
| 23 | + --> $SRC_DIR/core/src/intrinsics/mod.rs:LL:COL |
12 | 24 |
|
13 | 25 | error: aborting due to 2 previous errors |
14 | 26 |
|
15 | | -For more information about this error, try `rustc --explain E0080`. |
| 27 | +For more information about this error, try `rustc --explain E0277`. |
0 commit comments