]> git.lizzy.rs Git - rust.git/blob - tests/ui/const-generics/generic_const_exprs/issue-80742.stderr
Auto merge of #106711 - albertlarsan68:use-ci-llvm-when-lld, r=jyn514
[rust.git] / tests / ui / const-generics / generic_const_exprs / issue-80742.stderr
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    = 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: the following trait bounds were not satisfied:
27            `dyn Debug: Sized`
28
29 error[E0080]: evaluation of `Inline::<dyn std::fmt::Debug>::{constant#0}` failed
30   --> $SRC_DIR/core/src/mem/mod.rs:LL:COL
31    |
32    = note: size_of called on unsized type `dyn Debug`
33    |
34 note: inside `std::mem::size_of::<dyn Debug>`
35   --> $SRC_DIR/core/src/mem/mod.rs:LL:COL
36 note: inside `Inline::<dyn Debug>::{constant#0}`
37   --> $DIR/issue-80742.rs:14:10
38    |
39 LL |     [u8; size_of::<T>() + 1]: ,
40    |          ^^^^^^^^^^^^^^
41
42 error[E0277]: the size for values of type `dyn Debug` cannot be known at compilation time
43   --> $DIR/issue-80742.rs:30:15
44    |
45 LL |     let dst = Inline::<dyn Debug>::new(0);
46    |               ^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
47    |
48    = help: the trait `Sized` is not implemented for `dyn Debug`
49 note: required by a bound in `Inline`
50   --> $DIR/issue-80742.rs:12:15
51    |
52 LL | struct Inline<T>
53    |               ^ required by this bound in `Inline`
54 help: consider relaxing the implicit `Sized` restriction
55    |
56 LL | struct Inline<T: ?Sized>
57    |                ++++++++
58
59 error: aborting due to 4 previous errors
60
61 Some errors have detailed explanations: E0080, E0277, E0599.
62 For more information about an error, try `rustc --explain E0080`.