]> git.lizzy.rs Git - rust.git/blob - src/test/ui/const-generics/defaults/wfness.stderr
8b405d6753e5620d1537599b0b76935baac52b6e
[rust.git] / src / test / ui / const-generics / defaults / wfness.stderr
1 error[E0080]: evaluation of constant value failed
2   --> $DIR/wfness.rs:1:33
3    |
4 LL | struct Ooopsies<const N: u8 = { u8::MAX + 1 }>;
5    |                                 ^^^^^^^^^^^ attempt to compute `u8::MAX + 1_u8`, which would overflow
6
7 error[E0277]: the trait bound `(): Trait<2_u8>` is not satisfied
8   --> $DIR/wfness.rs:6:47
9    |
10 LL | struct WhereClause<const N: u8 = 2> where (): Trait<N>;
11    |                                               ^^^^^^^^ the trait `Trait<2_u8>` is not implemented for `()`
12    |
13    = help: the trait `Trait<3_u8>` is implemented for `()`
14
15 error[E0277]: the trait bound `(): Trait<1_u8>` is not satisfied
16   --> $DIR/wfness.rs:14:13
17    |
18 LL | fn foo() -> DependentDefaultWfness {
19    |             ^^^^^^^^^^^^^^^^^^^^^^ the trait `Trait<1_u8>` is not implemented for `()`
20    |
21    = help: the trait `Trait<3_u8>` is implemented for `()`
22 note: required by a bound in `WhereClause`
23   --> $DIR/wfness.rs:6:47
24    |
25 LL | struct WhereClause<const N: u8 = 2> where (): Trait<N>;
26    |                                               ^^^^^^^^ required by this bound in `WhereClause`
27
28 error: aborting due to 3 previous errors
29
30 Some errors have detailed explanations: E0080, E0277.
31 For more information about an error, try `rustc --explain E0080`.