]> git.lizzy.rs Git - rust.git/blob - src/test/ui/const-generics/generic_const_exprs/simple_fail.stderr
Move generic error message to separate branches
[rust.git] / src / test / ui / const-generics / generic_const_exprs / simple_fail.stderr
1 error[E0080]: evaluation of `test::<0_usize>::{constant#0}` failed
2   --> $DIR/simple_fail.rs:7:48
3    |
4 LL | fn test<const N: usize>() -> Arr<N> where [u8; N - 1]: Sized {
5    |                                                ^^^^^ attempt to compute `0_usize - 1_usize`, which would overflow
6
7 error[E0080]: evaluation of `Arr::<0_usize>::{constant#0}` failed
8   --> $DIR/simple_fail.rs:4:33
9    |
10 LL | type Arr<const N: usize> = [u8; N - 1];
11    |                                 ^^^^^ attempt to compute `0_usize - 1_usize`, which would overflow
12
13 error: aborting due to 2 previous errors
14
15 For more information about this error, try `rustc --explain E0080`.