diff options
| author | Deadbeef <ent3rm4n@gmail.com> | 2024-01-28 00:22:47 +0800 |
|---|---|---|
| committer | Deadbeef <ent3rm4n@gmail.com> | 2024-02-04 11:34:10 +0800 |
| commit | 74dbf3a070adac13f28f39e2d447b0148998cc40 (patch) | |
| tree | b47897bf275ab51eecb63498377e0878e24126c4 /tests | |
| parent | 96108c59812bd2a227d6098e0682b2f2811c36c0 (diff) | |
| download | rust-74dbf3a070adac13f28f39e2d447b0148998cc40.tar.gz rust-74dbf3a070adac13f28f39e2d447b0148998cc40.zip | |
fix ui tests
these ui changes are closer to what was there before const_trait_impl changes.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ui/suggestions/invalid-bin-op.stderr | 4 | ||||
| -rw-r--r-- | tests/ui/ufcs/ufcs-qpath-self-mismatch.stderr | 26 |
2 files changed, 17 insertions, 13 deletions
diff --git a/tests/ui/suggestions/invalid-bin-op.stderr b/tests/ui/suggestions/invalid-bin-op.stderr index 2bd745c645a..018250c8c1b 100644 --- a/tests/ui/suggestions/invalid-bin-op.stderr +++ b/tests/ui/suggestions/invalid-bin-op.stderr @@ -16,6 +16,10 @@ help: consider annotating `S<T>` with `#[derive(PartialEq)]` LL + #[derive(PartialEq)] LL | struct S<T>(T); | +help: consider introducing a `where` clause, but there might be an alternative better way to express this requirement + | +LL | pub fn foo<T>(s: S<T>, t: S<T>) where S<T>: PartialEq { + | +++++++++++++++++++++ error: aborting due to 1 previous error diff --git a/tests/ui/ufcs/ufcs-qpath-self-mismatch.stderr b/tests/ui/ufcs/ufcs-qpath-self-mismatch.stderr index e90784a54ae..c1281ce6a42 100644 --- a/tests/ui/ufcs/ufcs-qpath-self-mismatch.stderr +++ b/tests/ui/ufcs/ufcs-qpath-self-mismatch.stderr @@ -11,6 +11,19 @@ LL | <i32 as Add<u32>>::add(1, 2); <&'a i32 as Add<i32>> <&i32 as Add<&i32>> +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>`: + <i32 as Add> + <i32 as Add<&i32>> + <&'a i32 as Add<i32>> + <&i32 as Add<&i32>> + error[E0308]: mismatched types --> $DIR/ufcs-qpath-self-mismatch.rs:7:28 | @@ -55,19 +68,6 @@ help: change the type of the numeric literal from `u32` to `i32` LL | <i32 as Add<i32>>::add(1, 2i32); | ~~~ -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>`: - <i32 as Add> - <i32 as Add<&i32>> - <&'a i32 as Add<i32>> - <&i32 as Add<&i32>> - error: aborting due to 4 previous errors Some errors have detailed explanations: E0277, E0308. |
