rust/src/test/ui/ufcs/ufcs-qpath-self-mismatch.stderr

25 lines
785 B
Plaintext
Raw Normal View History

2018-08-08 07:28:26 -05:00
error[E0277]: cannot add `u32` to `i32`
2018-12-25 09:56:47 -06:00
--> $DIR/ufcs-qpath-self-mismatch.rs:4:5
2018-08-08 07:28:26 -05:00
|
LL | <i32 as Add<u32>>::add(1, 2);
| ^^^^^^^^^^^^^^^^^^^^^^ no implementation for `i32 + u32`
|
= help: the trait `std::ops::Add<u32>` is not implemented for `i32`
error[E0308]: mismatched types
2018-12-25 09:56:47 -06:00
--> $DIR/ufcs-qpath-self-mismatch.rs:6:28
2018-08-08 07:28:26 -05:00
|
LL | <i32 as Add<i32>>::add(1u32, 2);
| ^^^^ expected i32, found u32
error[E0308]: mismatched types
2018-12-25 09:56:47 -06:00
--> $DIR/ufcs-qpath-self-mismatch.rs:8:31
2018-08-08 07:28:26 -05:00
|
LL | <i32 as Add<i32>>::add(1, 2u32);
| ^^^^ expected i32, found u32
error: aborting due to 3 previous errors
Some errors occurred: E0277, E0308.
For more information about an error, try `rustc --explain E0277`.