]> git.lizzy.rs Git - rust.git/blob - src/test/ui/const-generics/type_mismatch.stderr
Auto merge of #87150 - rusticstuff:simplify_wrapping_neg, r=m-ou-se
[rust.git] / src / test / ui / const-generics / type_mismatch.stderr
1 error[E0308]: mismatched types
2   --> $DIR/type_mismatch.rs:2:11
3    |
4 LL |     bar::<N>()
5    |           ^ expected `u8`, found `usize`
6
7 error[E0308]: mismatched types
8   --> $DIR/type_mismatch.rs:5:31
9    |
10 LL | fn bar<const N: u8>() -> [u8; N] {}
11    |                               ^ expected `usize`, found `u8`
12
13 error[E0308]: mismatched types
14   --> $DIR/type_mismatch.rs:5:26
15    |
16 LL | fn bar<const N: u8>() -> [u8; N] {}
17    |    ---                   ^^^^^^^ expected array `[u8; N]`, found `()`
18    |    |
19    |    implicitly returns `()` as its body has no tail or `return` expression
20
21 error: aborting due to 3 previous errors
22
23 For more information about this error, try `rustc --explain E0308`.