]>
Commit | Line | Data |
---|---|---|
b7449926 | 1 | error[E0277]: cannot add `u32` to `i32` |
0731742a | 2 | --> $DIR/ufcs-qpath-self-mismatch.rs:4:5 |
b7449926 XL |
3 | | |
4 | LL | <i32 as Add<u32>>::add(1, 2); | |
5 | | ^^^^^^^^^^^^^^^^^^^^^^ no implementation for `i32 + u32` | |
6 | | | |
7 | = help: the trait `std::ops::Add<u32>` is not implemented for `i32` | |
8 | ||
9 | error[E0308]: mismatched types | |
0731742a | 10 | --> $DIR/ufcs-qpath-self-mismatch.rs:6:28 |
b7449926 XL |
11 | | |
12 | LL | <i32 as Add<i32>>::add(1u32, 2); | |
60c5eb7d | 13 | | ^^^^ expected `i32`, found `u32` |
e74abb32 | 14 | | |
48663c56 XL |
15 | help: change the type of the numeric literal from `u32` to `i32` |
16 | | | |
17 | LL | <i32 as Add<i32>>::add(1i32, 2); | |
18 | | ^^^^ | |
b7449926 XL |
19 | |
20 | error[E0308]: mismatched types | |
0731742a | 21 | --> $DIR/ufcs-qpath-self-mismatch.rs:8:31 |
b7449926 XL |
22 | | |
23 | LL | <i32 as Add<i32>>::add(1, 2u32); | |
60c5eb7d | 24 | | ^^^^ expected `i32`, found `u32` |
e74abb32 | 25 | | |
48663c56 XL |
26 | help: change the type of the numeric literal from `u32` to `i32` |
27 | | | |
28 | LL | <i32 as Add<i32>>::add(1, 2i32); | |
29 | | ^^^^ | |
b7449926 XL |
30 | |
31 | error: aborting due to 3 previous errors | |
32 | ||
48663c56 | 33 | Some errors have detailed explanations: E0277, E0308. |
b7449926 | 34 | For more information about an error, try `rustc --explain E0277`. |