]> git.lizzy.rs Git - rust.git/blob - src/test/ui/typeck/issue-81293.stderr
Rollup merge of #95671 - gimbles:master, r=Mark-Simulacrum
[rust.git] / src / test / ui / typeck / issue-81293.stderr
1 error[E0308]: mismatched types
2   --> $DIR/issue-81293.rs:6:13
3    |
4 LL |     a = c + b * 5;
5    |             ^^^^^ expected `usize`, found `u16`
6
7 error[E0308]: mismatched types
8   --> $DIR/issue-81293.rs:6:9
9    |
10 LL |     let a: u16;
11    |            --- expected due to this type
12 ...
13 LL |     a = c + b * 5;
14    |         ^^^^^^^^^ expected `u16`, found `usize`
15
16 error[E0277]: cannot add `u16` to `usize`
17   --> $DIR/issue-81293.rs:6:11
18    |
19 LL |     a = c + b * 5;
20    |           ^ no implementation for `usize + u16`
21    |
22    = help: the trait `Add<u16>` is not implemented for `usize`
23    = help: the following other types implement trait `Add<Rhs>`:
24              <&'a f32 as Add<f32>>
25              <&'a f64 as Add<f64>>
26              <&'a i128 as Add<i128>>
27              <&'a i16 as Add<i16>>
28              <&'a i32 as Add<i32>>
29              <&'a i64 as Add<i64>>
30              <&'a i8 as Add<i8>>
31              <&'a isize as Add<isize>>
32            and 48 others
33
34 error: aborting due to 3 previous errors
35
36 Some errors have detailed explanations: E0277, E0308.
37 For more information about an error, try `rustc --explain E0277`.