]> git.lizzy.rs Git - rust.git/blob - tests/ui/consts/const-eval/const-eval-overflow-3b.stderr
Rollup merge of #106244 - atouchet:readme3, r=workingjubilee
[rust.git] / tests / ui / consts / const-eval / const-eval-overflow-3b.stderr
1 error[E0308]: mismatched types
2   --> $DIR/const-eval-overflow-3b.rs:16:22
3    |
4 LL |     = [0; (i8::MAX + 1u8) as usize];
5    |                      ^^^ expected `i8`, found `u8`
6
7 error[E0277]: cannot add `u8` to `i8` in const contexts
8   --> $DIR/const-eval-overflow-3b.rs:16:20
9    |
10 LL |     = [0; (i8::MAX + 1u8) as usize];
11    |                    ^ no implementation for `i8 + u8`
12    |
13    = help: the trait `~const Add<u8>` is not implemented for `i8`
14    = help: the following other types implement trait `Add<Rhs>`:
15              <&'a i8 as Add<i8>>
16              <&i8 as Add<&i8>>
17              <i8 as Add<&i8>>
18              <i8 as Add>
19
20 error: aborting due to 2 previous errors
21
22 Some errors have detailed explanations: E0277, E0308.
23 For more information about an error, try `rustc --explain E0277`.