]> git.proxmox.com Git - rustc.git/blame - src/test/ui/mir/issue-80742.stderr
Merge tag 'debian/1.52.1+dfsg1-1_exp2' into proxmox/buster
[rustc.git] / src / test / ui / mir / issue-80742.stderr
CommitLineData
5869c6ff
XL
1error[E0080]: evaluation of constant value failed
2 --> $SRC_DIR/core/src/mem/mod.rs:LL:COL
3 |
4LL | 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 |
12LL | [u8; size_of::<T>() + 1]: ,
13 | -------------- inside `Inline::<dyn Debug>::{constant#0}` at $DIR/issue-80742.rs:23:10
14
15error[E0599]: the function or associated item `new` exists for struct `Inline<dyn Debug>`, but its trait bounds were not satisfied
16 --> $DIR/issue-80742.rs:31:36
17 |
18LL | / struct Inline<T>
19LL | | where
20LL | | [u8; size_of::<T>() + 1]: ,
21LL | | {
22LL | | _phantom: PhantomData<T>,
23LL | | buf: [u8; size_of::<T>() + 1],
24LL | | }
25 | |_- function or associated item `new` not found for this
26...
27LL | let dst = Inline::<dyn Debug>::new(0);
28 | ^^^ function or associated item cannot be called on `Inline<dyn Debug>` due to unsatisfied trait bounds
29 |
30 ::: $SRC_DIR/core/src/fmt/mod.rs:LL:COL
31 |
32LL | pub trait Debug {
33 | --------------- doesn't satisfy `dyn Debug: Sized`
34 |
35 = note: the following trait bounds were not satisfied:
36 `dyn Debug: Sized`
37
38error[E0080]: evaluation of constant value failed
39 --> $SRC_DIR/core/src/mem/mod.rs:LL:COL
40 |
41LL | 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 |
49LL | [u8; size_of::<T>() + 1]: ,
50 | -------------- inside `Inline::<dyn Debug>::{constant#0}` at $DIR/issue-80742.rs:15:10
51
52error[E0277]: the size for values of type `dyn Debug` cannot be known at compilation time
53 --> $DIR/issue-80742.rs:31:15
54 |
55LL | struct Inline<T>
56 | - required by this bound in `Inline`
57...
58LL | let dst = Inline::<dyn Debug>::new(0);
6a06907d 59 | ^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
5869c6ff
XL
60 |
61 = help: the trait `Sized` is not implemented for `dyn Debug`
62help: consider relaxing the implicit `Sized` restriction
63 |
64LL | struct Inline<T: ?Sized>
65 | ^^^^^^^^
66
67error: aborting due to 4 previous errors
68
69Some errors have detailed explanations: E0080, E0277, E0599.
70For more information about an error, try `rustc --explain E0080`.