diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:06:31 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:06:31 +0000 |
commit | 2ff14448863ac1a1dd9533461708e29aae170c2d (patch) | |
tree | 85b9fea2bbfe3f06473cfa381eed11f273b57c5c /src/test/ui/ufcs | |
parent | Adding debian version 1.64.0+dfsg1-1. (diff) | |
download | rustc-2ff14448863ac1a1dd9533461708e29aae170c2d.tar.xz rustc-2ff14448863ac1a1dd9533461708e29aae170c2d.zip |
Adding debian version 1.65.0+dfsg1-2.debian/1.65.0+dfsg1-2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/ui/ufcs')
-rw-r--r-- | src/test/ui/ufcs/ufcs-qpath-self-mismatch.rs | 1 | ||||
-rw-r--r-- | src/test/ui/ufcs/ufcs-qpath-self-mismatch.stderr | 30 |
2 files changed, 26 insertions, 5 deletions
diff --git a/src/test/ui/ufcs/ufcs-qpath-self-mismatch.rs b/src/test/ui/ufcs/ufcs-qpath-self-mismatch.rs index 939b3c522..ec86213f8 100644 --- a/src/test/ui/ufcs/ufcs-qpath-self-mismatch.rs +++ b/src/test/ui/ufcs/ufcs-qpath-self-mismatch.rs @@ -3,6 +3,7 @@ use std::ops::Add; fn main() { <i32 as Add<u32>>::add(1, 2); //~^ ERROR cannot add `u32` to `i32` + //~| ERROR cannot add `u32` to `i32` <i32 as Add<i32>>::add(1u32, 2); //~^ ERROR mismatched types <i32 as Add<i32>>::add(1, 2u32); diff --git a/src/test/ui/ufcs/ufcs-qpath-self-mismatch.stderr b/src/test/ui/ufcs/ufcs-qpath-self-mismatch.stderr index c6f9b3661..eaab6ff3d 100644 --- a/src/test/ui/ufcs/ufcs-qpath-self-mismatch.stderr +++ b/src/test/ui/ufcs/ufcs-qpath-self-mismatch.stderr @@ -1,8 +1,10 @@ error[E0277]: cannot add `u32` to `i32` - --> $DIR/ufcs-qpath-self-mismatch.rs:4:5 + --> $DIR/ufcs-qpath-self-mismatch.rs:4:31 | LL | <i32 as Add<u32>>::add(1, 2); - | ^^^^^^^^^^^^^^^^^^^^^^ no implementation for `i32 + u32` + | ---------------------- ^ no implementation for `i32 + u32` + | | + | required by a bound introduced by this call | = help: the trait `Add<u32>` is not implemented for `i32` = help: the following other types implement trait `Add<Rhs>`: @@ -17,7 +19,7 @@ LL | <i32 as Add<u32>>::add(1, 2); and 48 others error[E0308]: mismatched types - --> $DIR/ufcs-qpath-self-mismatch.rs:6:28 + --> $DIR/ufcs-qpath-self-mismatch.rs:7:28 | LL | <i32 as Add<i32>>::add(1u32, 2); | ---------------------- ^^^^ expected `i32`, found `u32` @@ -35,7 +37,7 @@ LL | <i32 as Add<i32>>::add(1i32, 2); | ~~~ error[E0308]: mismatched types - --> $DIR/ufcs-qpath-self-mismatch.rs:8:31 + --> $DIR/ufcs-qpath-self-mismatch.rs:9:31 | LL | <i32 as Add<i32>>::add(1, 2u32); | ---------------------- ^^^^ expected `i32`, found `u32` @@ -52,7 +54,25 @@ help: change the type of the numeric literal from `u32` to `i32` LL | <i32 as Add<i32>>::add(1, 2i32); | ~~~ -error: aborting due to 3 previous errors +error[E0277]: cannot add `u32` to `i32` + --> $DIR/ufcs-qpath-self-mismatch.rs:4:5 + | +LL | <i32 as Add<u32>>::add(1, 2); + | ^^^^^^^^^^^^^^^^^^^^^^ no implementation for `i32 + u32` + | + = help: the trait `Add<u32>` is not implemented for `i32` + = help: the following other types implement trait `Add<Rhs>`: + <&'a f32 as Add<f32>> + <&'a f64 as Add<f64>> + <&'a i128 as Add<i128>> + <&'a i16 as Add<i16>> + <&'a i32 as Add<i32>> + <&'a i64 as Add<i64>> + <&'a i8 as Add<i8>> + <&'a isize as Add<isize>> + and 48 others + +error: aborting due to 4 previous errors Some errors have detailed explanations: E0277, E0308. For more information about an error, try `rustc --explain E0277`. |