@@ -11,16 +11,29 @@ LL | <i32 as Add<u32>>::add(1, 2);
11
11
<&'a i32 as Add<i32>>
12
12
<&i32 as Add<&i32>>
13
13
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
+
14
27
error[E0308]: mismatched types
15
- --> $DIR/ufcs-qpath-self-mismatch.rs:7 :28
28
+ --> $DIR/ufcs-qpath-self-mismatch.rs:8 :28
16
29
|
17
30
LL | <i32 as Add<i32>>::add(1u32, 2);
18
31
| ---------------------- ^^^^ expected `i32`, found `u32`
19
32
| |
20
33
| arguments to this function are incorrect
21
34
|
22
35
help: 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
24
37
|
25
38
LL | <i32 as Add<i32>>::add(1u32, 2);
26
39
| ^^^^^^^^^^^^^^^^^^^^^^^----^^^^
@@ -34,15 +47,15 @@ LL | <i32 as Add<i32>>::add(1i32, 2);
34
47
| ~~~
35
48
36
49
error[E0308]: mismatched types
37
- --> $DIR/ufcs-qpath-self-mismatch.rs:9 :31
50
+ --> $DIR/ufcs-qpath-self-mismatch.rs:10 :31
38
51
|
39
52
LL | <i32 as Add<i32>>::add(1, 2u32);
40
53
| ---------------------- ^^^^ expected `i32`, found `u32`
41
54
| |
42
55
| arguments to this function are incorrect
43
56
|
44
57
help: 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
46
59
|
47
60
LL | <i32 as Add<i32>>::add(1, 2u32);
48
61
| ^^^^^^^^^^^^^^^^^^^^^^^^^^----^
@@ -68,7 +81,7 @@ LL | <i32 as Add<u32>>::add(1, 2);
68
81
<&'a i32 as Add<i32>>
69
82
<&i32 as Add<&i32>>
70
83
71
- error: aborting due to 4 previous errors
84
+ error: aborting due to 5 previous errors
72
85
73
86
Some errors have detailed explanations: E0277, E0308.
74
87
For more information about an error, try `rustc --explain E0277`.
0 commit comments