1+ error[E0080]: evaluation of constant value failed
2+ --> $SRC_DIR/core/src/mem/mod.rs:LL:COL
3+ |
4+ LL | intrinsics::size_of::<T>()
5+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^
6+ | |
7+ | size_of called on unsized type `dyn Debug`
8+ | inside `std::mem::size_of::<dyn Debug>` at $SRC_DIR/core/src/mem/mod.rs:LL:COL
9+ |
10+ ::: $DIR/issue-80742.rs:23:10
11+ |
12+ LL | [u8; size_of::<T>() + 1]: ,
13+ | -------------- inside `Inline::<dyn Debug>::{constant#0}` at $DIR/issue-80742.rs:23:10
14+
115error[E0599]: no function or associated item named `new` found for struct `Inline<dyn Debug>` in the current scope
216 --> $DIR/issue-80742.rs:31:36
317 |
@@ -21,6 +35,20 @@ LL | pub trait Debug {
2135 = note: the method `new` exists but the following trait bounds were not satisfied:
2236 `dyn Debug: Sized`
2337
38+ error[E0080]: evaluation of constant value failed
39+ --> $SRC_DIR/core/src/mem/mod.rs:LL:COL
40+ |
41+ LL | intrinsics::size_of::<T>()
42+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^
43+ | |
44+ | size_of called on unsized type `dyn Debug`
45+ | inside `std::mem::size_of::<dyn Debug>` at $SRC_DIR/core/src/mem/mod.rs:LL:COL
46+ |
47+ ::: $DIR/issue-80742.rs:15:10
48+ |
49+ LL | [u8; size_of::<T>() + 1]: ,
50+ | -------------- inside `Inline::<dyn Debug>::{constant#0}` at $DIR/issue-80742.rs:15:10
51+
2452error[E0277]: the size for values of type `dyn Debug` cannot be known at compilation time
2553 --> $DIR/issue-80742.rs:31:15
2654 |
@@ -36,7 +64,7 @@ help: consider relaxing the implicit `Sized` restriction
3664LL | struct Inline<T: ?Sized>
3765 | ^^^^^^^^
3866
39- error: aborting due to 2 previous errors
67+ error: aborting due to 4 previous errors
4068
41- Some errors have detailed explanations: E0277, E0599.
42- For more information about an error, try `rustc --explain E0277 `.
69+ Some errors have detailed explanations: E0080, E0277, E0599.
70+ For more information about an error, try `rustc --explain E0080 `.
0 commit comments