1
- error[E0080]: evaluation of `Inline::<dyn std::fmt::Debug>::{constant#0}` 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:22:10
11
- |
12
- LL | [u8; size_of::<T>() + 1]: ,
13
- | -------------- inside `Inline::<dyn Debug>::{constant#0}` at $DIR/issue-80742.rs:22:10
14
-
15
1
error[E0599]: the function or associated item `new` exists for struct `Inline<dyn Debug>`, but its trait bounds were not satisfied
16
2
--> $DIR/issue-80742.rs:30:36
17
3
|
@@ -35,6 +21,23 @@ LL | pub trait Debug {
35
21
= note: the following trait bounds were not satisfied:
36
22
`dyn Debug: Sized`
37
23
24
+ error[E0277]: the size for values of type `dyn Debug` cannot be known at compilation time
25
+ --> $DIR/issue-80742.rs:30:15
26
+ |
27
+ LL | let dst = Inline::<dyn Debug>::new(0);
28
+ | ^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
29
+ |
30
+ = help: the trait `Sized` is not implemented for `dyn Debug`
31
+ note: required by a bound in `Inline`
32
+ --> $DIR/issue-80742.rs:12:15
33
+ |
34
+ LL | struct Inline<T>
35
+ | ^ required by this bound in `Inline`
36
+ help: consider relaxing the implicit `Sized` restriction
37
+ |
38
+ LL | struct Inline<T: ?Sized>
39
+ | ++++++++
40
+
38
41
error[E0080]: evaluation of `Inline::<dyn std::fmt::Debug>::{constant#0}` failed
39
42
--> $SRC_DIR/core/src/mem/mod.rs:LL:COL
40
43
|
@@ -49,22 +52,20 @@ LL | intrinsics::size_of::<T>()
49
52
LL | [u8; size_of::<T>() + 1]: ,
50
53
| -------------- inside `Inline::<dyn Debug>::{constant#0}` at $DIR/issue-80742.rs:14:10
51
54
52
- error[E0277]: the size for values of type `dyn Debug` cannot be known at compilation time
55
+ error: failed to evaluate the given constant
53
56
--> $DIR/issue-80742.rs:30:15
54
57
|
55
58
LL | let dst = Inline::<dyn Debug>::new(0);
56
- | ^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
59
+ | ^^^^^^^^^^^^^^^^^^^
57
60
|
58
- = help: the trait `Sized` is not implemented for `dyn Debug`
59
61
note: required by a bound in `Inline`
60
- --> $DIR/issue-80742.rs:12:15
62
+ --> $DIR/issue-80742.rs:14:10
61
63
|
62
64
LL | struct Inline<T>
63
- | ^ required by this bound in `Inline`
64
- help: consider relaxing the implicit `Sized` restriction
65
- |
66
- LL | struct Inline<T: ?Sized>
67
- | ++++++++
65
+ | ------ required by a bound in this
66
+ LL | where
67
+ LL | [u8; size_of::<T>() + 1]: ,
68
+ | ^^^^^^^^^^^^^^^^^^ required by this bound in `Inline`
68
69
69
70
error: aborting due to 4 previous errors
70
71
0 commit comments