|
1 | | -error[E0080]: evaluation of `Inline::<dyn Debug>::{constant#0}` failed |
| 1 | +error: internal compiler error: compiler/rustc_const_eval/src/interpret/step.rs:272:21: SizeOf MIR operator called for unsized type dyn Debug |
2 | 2 | --> $SRC_DIR/core/src/mem/mod.rs:LL:COL |
3 | | - | |
4 | | - = note: size_of called on unsized type `dyn Debug` |
5 | | - | |
6 | | -note: inside `std::mem::size_of::<dyn Debug>` |
7 | | - --> $SRC_DIR/core/src/mem/mod.rs:LL:COL |
8 | | -note: inside `Inline::<dyn Debug>::{constant#0}` |
9 | | - --> $DIR/issue-80742.rs:22:10 |
10 | | - | |
11 | | -LL | [u8; size_of::<T>() + 1]: , |
12 | | - | ^^^^^^^^^^^^^^ |
13 | | - |
14 | | -error[E0599]: the function or associated item `new` exists for struct `Inline<dyn Debug>`, but its trait bounds were not satisfied |
15 | | - --> $DIR/issue-80742.rs:30:36 |
16 | | - | |
17 | | -LL | struct Inline<T> |
18 | | - | ---------------- function or associated item `new` not found for this struct |
19 | | -... |
20 | | -LL | let dst = Inline::<dyn Debug>::new(0); |
21 | | - | ^^^ function or associated item cannot be called on `Inline<dyn Debug>` due to unsatisfied trait bounds |
22 | | - --> $SRC_DIR/core/src/fmt/mod.rs:LL:COL |
23 | | - | |
24 | | - = note: doesn't satisfy `dyn Debug: Sized` |
25 | | - | |
26 | | -note: trait bound `dyn Debug: Sized` was not satisfied |
27 | | - --> $DIR/issue-80742.rs:20:6 |
28 | | - | |
29 | | -LL | impl<T> Inline<T> |
30 | | - | ^ --------- |
31 | | - | | |
32 | | - | unsatisfied trait bound introduced here |
33 | | -help: consider relaxing the type parameter's implicit `Sized` bound |
34 | | - | |
35 | | -LL | impl<T: ?Sized> Inline<T> |
36 | | - | ++++++++ |
37 | | - |
38 | | -error[E0080]: evaluation of `Inline::<dyn Debug>::{constant#0}` failed |
39 | | - --> $SRC_DIR/core/src/mem/mod.rs:LL:COL |
40 | | - | |
41 | | - = note: size_of called on unsized type `dyn Debug` |
42 | | - | |
43 | | -note: inside `std::mem::size_of::<dyn Debug>` |
44 | | - --> $SRC_DIR/core/src/mem/mod.rs:LL:COL |
45 | | -note: inside `Inline::<dyn Debug>::{constant#0}` |
46 | | - --> $DIR/issue-80742.rs:14:10 |
47 | | - | |
48 | | -LL | [u8; size_of::<T>() + 1]: , |
49 | | - | ^^^^^^^^^^^^^^ |
50 | | - |
51 | | -error[E0277]: the size for values of type `dyn Debug` cannot be known at compilation time |
52 | | - --> $DIR/issue-80742.rs:30:15 |
53 | | - | |
54 | | -LL | let dst = Inline::<dyn Debug>::new(0); |
55 | | - | ^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time |
56 | | - | |
57 | | - = help: the trait `Sized` is not implemented for `dyn Debug` |
58 | | -note: required by a bound in `Inline` |
59 | | - --> $DIR/issue-80742.rs:12:15 |
60 | | - | |
61 | | -LL | struct Inline<T> |
62 | | - | ^ required by this bound in `Inline` |
63 | | -help: consider relaxing the implicit `Sized` restriction |
64 | | - | |
65 | | -LL | struct Inline<T: ?Sized> |
66 | | - | ++++++++ |
67 | 3 |
|
68 | | -error: aborting due to 4 previous errors |
| 4 | +Box<dyn Any> |
| 5 | +query stack during panic: |
| 6 | +#0 [eval_to_allocation_raw] const-evaluating + checking `<impl at $DIR/issue-80742.rs:25:1: 25:18>::{constant#0}` |
| 7 | +#1 [eval_to_valtree] evaluating type-level constant |
| 8 | +end of query stack |
| 9 | +error: aborting due to previous error |
69 | 10 |
|
70 | | -Some errors have detailed explanations: E0080, E0277, E0599. |
71 | | -For more information about an error, try `rustc --explain E0080`. |
0 commit comments