|
| 1 | +error: the constant `N` is not of type `bool` |
| 2 | + --> $DIR/type-mismatch-in-nested-goal.rs:9:50 |
| 3 | + | |
| 4 | +LL | fn needs_a<const N: usize>(_: [u8; N]) where (): A<N> {} |
| 5 | + | ^^^^ expected `bool`, found `usize` |
| 6 | + | |
| 7 | +note: required by a const generic parameter in `A` |
| 8 | + --> $DIR/type-mismatch-in-nested-goal.rs:5:9 |
| 9 | + | |
| 10 | +LL | trait A<const B: bool> {} |
| 11 | + | ^^^^^^^^^^^^^ required by this const generic parameter in `A` |
| 12 | + |
| 13 | +error: the constant `true` is not of type `usize` |
| 14 | + --> $DIR/type-mismatch-in-nested-goal.rs:13:13 |
| 15 | + | |
| 16 | +LL | needs_a([]); |
| 17 | + | ------- ^^ expected `usize`, found `bool` |
| 18 | + | | |
| 19 | + | required by a bound introduced by this call |
| 20 | + | |
| 21 | +note: required by a const generic parameter in `needs_a` |
| 22 | + --> $DIR/type-mismatch-in-nested-goal.rs:9:12 |
| 23 | + | |
| 24 | +LL | fn needs_a<const N: usize>(_: [u8; N]) where (): A<N> {} |
| 25 | + | ^^^^^^^^^^^^^^ required by this const generic parameter in `needs_a` |
| 26 | + |
| 27 | +error[E0308]: mismatched types |
| 28 | + --> $DIR/type-mismatch-in-nested-goal.rs:13:13 |
| 29 | + | |
| 30 | +LL | needs_a([]); |
| 31 | + | ------- ^^ expected an array with a size of true, found one with a size of 0 |
| 32 | + | | |
| 33 | + | arguments to this function are incorrect |
| 34 | + | |
| 35 | + = note: expected array `[u8; true]` |
| 36 | + found array `[_; 0]` |
| 37 | +note: function defined here |
| 38 | + --> $DIR/type-mismatch-in-nested-goal.rs:9:4 |
| 39 | + | |
| 40 | +LL | fn needs_a<const N: usize>(_: [u8; N]) where (): A<N> {} |
| 41 | + | ^^^^^^^ ---------- |
| 42 | + |
| 43 | +error: aborting due to 3 previous errors |
| 44 | + |
| 45 | +For more information about this error, try `rustc --explain E0308`. |
0 commit comments