]> git.lizzy.rs Git - rust.git/blob - tests/ui/const-generics/generic-param-mismatch.stderr
Rollup merge of #106321 - compiler-errors:delayed-bug-backtrace, r=Nilstrieb
[rust.git] / tests / ui / const-generics / generic-param-mismatch.stderr
1 error[E0308]: mismatched types
2   --> $DIR/generic-param-mismatch.rs:2:5
3    |
4 LL | fn test<const N: usize, const M: usize>() -> [u8; M] {
5    |                                              ------- expected `[u8; M]` because of return type
6 LL |     [0; N]
7    |     ^^^^^^ expected `M`, found `N`
8    |
9    = note: expected array `[u8; M]`
10               found array `[u8; N]`
11
12 error: aborting due to previous error
13
14 For more information about this error, try `rustc --explain E0308`.