Skip to content

Commit 74dbf3a

Browse files
committed
fix ui tests
these ui changes are closer to what was there before const_trait_impl changes.
1 parent 96108c5 commit 74dbf3a

File tree

2 files changed

+17
-13
lines changed

2 files changed

+17
-13
lines changed

tests/ui/suggestions/invalid-bin-op.stderr

+4
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ help: consider annotating `S<T>` with `#[derive(PartialEq)]`
1616
LL + #[derive(PartialEq)]
1717
LL | struct S<T>(T);
1818
|
19+
help: consider introducing a `where` clause, but there might be an alternative better way to express this requirement
20+
|
21+
LL | pub fn foo<T>(s: S<T>, t: S<T>) where S<T>: PartialEq {
22+
| +++++++++++++++++++++
1923

2024
error: aborting due to 1 previous error
2125

tests/ui/ufcs/ufcs-qpath-self-mismatch.stderr

+13-13
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,19 @@ LL | <i32 as Add<u32>>::add(1, 2);
1111
<&'a i32 as Add<i32>>
1212
<&i32 as Add<&i32>>
1313

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+
1427
error[E0308]: mismatched types
1528
--> $DIR/ufcs-qpath-self-mismatch.rs:7:28
1629
|
@@ -55,19 +68,6 @@ help: change the type of the numeric literal from `u32` to `i32`
5568
LL | <i32 as Add<i32>>::add(1, 2i32);
5669
| ~~~
5770

58-
error[E0277]: cannot add `u32` to `i32`
59-
--> $DIR/ufcs-qpath-self-mismatch.rs:4:5
60-
|
61-
LL | <i32 as Add<u32>>::add(1, 2);
62-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no implementation for `i32 + u32`
63-
|
64-
= help: the trait `Add<u32>` is not implemented for `i32`
65-
= help: the following other types implement trait `Add<Rhs>`:
66-
<i32 as Add>
67-
<i32 as Add<&i32>>
68-
<&'a i32 as Add<i32>>
69-
<&i32 as Add<&i32>>
70-
7171
error: aborting due to 4 previous errors
7272

7373
Some errors have detailed explanations: E0277, E0308.

0 commit comments

Comments
 (0)