]> git.lizzy.rs Git - rust.git/blob - tests/ui/ufcs/ufcs-qpath-self-mismatch.stderr
Unify Opaque/Projection handling in region outlives code
[rust.git] / tests / ui / ufcs / ufcs-qpath-self-mismatch.stderr
1 error[E0277]: cannot add `u32` to `i32`
2   --> $DIR/ufcs-qpath-self-mismatch.rs:4:31
3    |
4 LL |     <i32 as Add<u32>>::add(1, 2);
5    |     ----------------------    ^ no implementation for `i32 + u32`
6    |     |
7    |     required by a bound introduced by this call
8    |
9    = help: the trait `Add<u32>` is not implemented for `i32`
10    = help: the following other types implement trait `Add<Rhs>`:
11              <&'a i32 as Add<i32>>
12              <&i32 as Add<&i32>>
13              <i32 as Add<&i32>>
14              <i32 as Add>
15
16 error[E0308]: mismatched types
17   --> $DIR/ufcs-qpath-self-mismatch.rs:7:28
18    |
19 LL |     <i32 as Add<i32>>::add(1u32, 2);
20    |     ---------------------- ^^^^ expected `i32`, found `u32`
21    |     |
22    |     arguments to this function are incorrect
23    |
24 note: associated function defined here
25   --> $SRC_DIR/core/src/ops/arith.rs:LL:COL
26 help: change the type of the numeric literal from `u32` to `i32`
27    |
28 LL |     <i32 as Add<i32>>::add(1i32, 2);
29    |                             ~~~
30
31 error[E0308]: mismatched types
32   --> $DIR/ufcs-qpath-self-mismatch.rs:9:31
33    |
34 LL |     <i32 as Add<i32>>::add(1, 2u32);
35    |     ----------------------    ^^^^ expected `i32`, found `u32`
36    |     |
37    |     arguments to this function are incorrect
38    |
39 note: associated function defined here
40   --> $SRC_DIR/core/src/ops/arith.rs:LL:COL
41 help: change the type of the numeric literal from `u32` to `i32`
42    |
43 LL |     <i32 as Add<i32>>::add(1, 2i32);
44    |                                ~~~
45
46 error[E0277]: cannot add `u32` to `i32`
47   --> $DIR/ufcs-qpath-self-mismatch.rs:4:5
48    |
49 LL |     <i32 as Add<u32>>::add(1, 2);
50    |     ^^^^^^^^^^^^^^^^^^^^^^ no implementation for `i32 + u32`
51    |
52    = help: the trait `Add<u32>` is not implemented for `i32`
53    = help: the following other types implement trait `Add<Rhs>`:
54              <&'a i32 as Add<i32>>
55              <&i32 as Add<&i32>>
56              <i32 as Add<&i32>>
57              <i32 as Add>
58
59 error: aborting due to 4 previous errors
60
61 Some errors have detailed explanations: E0277, E0308.
62 For more information about an error, try `rustc --explain E0277`.