@@ -11,16 +11,29 @@ LL | <i32 as Add<u32>>::add(1, 2);
1111 <&'a i32 as Add<i32>>
1212 <&i32 as Add<&i32>>
1313
14+ error[E0277]: cannot add `u32` to `i32`
15+ --> $DIR/ufcs-qpath-self-mismatch.rs:4:5
16+ |
17+ LL | <i32 as Add<u32>>::add(1, 2);
18+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no implementation for `i32 + u32`
19+ |
20+ = help: the trait `Add<u32>` is not implemented for `i32`
21+ = help: the following other types implement trait `Add<Rhs>`:
22+ <i32 as Add>
23+ <i32 as Add<&i32>>
24+ <&'a i32 as Add<i32>>
25+ <&i32 as Add<&i32>>
26+
1427error[E0308]: mismatched types
15- --> $DIR/ufcs-qpath-self-mismatch.rs:7 :28
28+ --> $DIR/ufcs-qpath-self-mismatch.rs:8 :28
1629 |
1730LL | <i32 as Add<i32>>::add(1u32, 2);
1831 | ---------------------- ^^^^ expected `i32`, found `u32`
1932 | |
2033 | arguments to this function are incorrect
2134 |
2235help: the return type of this call is `u32` due to the type of the argument passed
23- --> $DIR/ufcs-qpath-self-mismatch.rs:7 :5
36+ --> $DIR/ufcs-qpath-self-mismatch.rs:8 :5
2437 |
2538LL | <i32 as Add<i32>>::add(1u32, 2);
2639 | ^^^^^^^^^^^^^^^^^^^^^^^----^^^^
@@ -34,15 +47,15 @@ LL | <i32 as Add<i32>>::add(1i32, 2);
3447 | ~~~
3548
3649error[E0308]: mismatched types
37- --> $DIR/ufcs-qpath-self-mismatch.rs:9 :31
50+ --> $DIR/ufcs-qpath-self-mismatch.rs:10 :31
3851 |
3952LL | <i32 as Add<i32>>::add(1, 2u32);
4053 | ---------------------- ^^^^ expected `i32`, found `u32`
4154 | |
4255 | arguments to this function are incorrect
4356 |
4457help: the return type of this call is `u32` due to the type of the argument passed
45- --> $DIR/ufcs-qpath-self-mismatch.rs:9 :5
58+ --> $DIR/ufcs-qpath-self-mismatch.rs:10 :5
4659 |
4760LL | <i32 as Add<i32>>::add(1, 2u32);
4861 | ^^^^^^^^^^^^^^^^^^^^^^^^^^----^
@@ -68,7 +81,7 @@ LL | <i32 as Add<u32>>::add(1, 2);
6881 <&'a i32 as Add<i32>>
6982 <&i32 as Add<&i32>>
7083
71- error: aborting due to 4 previous errors
84+ error: aborting due to 5 previous errors
7285
7386Some errors have detailed explanations: E0277, E0308.
7487For more information about an error, try `rustc --explain E0277`.
0 commit comments