Skip to content

Commit 580a93e

Browse files
committed
Fix rebase
1 parent 669a403 commit 580a93e

File tree

3 files changed

+17
-12
lines changed

3 files changed

+17
-12
lines changed

src/test/ui/issues/issue-43784-associated-type.stderr

+4-5
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,12 @@ LL | type Assoc: Partial<Self>;
55
| ----- associated type defined here
66
...
77
LL | impl<T> Complete for T {
8-
| ---------------------- in this `impl` item
9-
| |
10-
| help: consider restricting this bound: `T: std::marker::Copy`
8+
| ----------------------
9+
| | |
10+
| | help: consider restricting this bound: `T: std::marker::Copy`
11+
| in this `impl` item
1112
LL | type Assoc = T;
1213
| ^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `T`
13-
|
14-
= help: consider adding a `where T: std::marker::Copy` bound
1514

1615
error: aborting due to previous error
1716

src/test/ui/suggestions/missing-assoc-type-bound-restriction.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ struct ParentWrapper<T>(T);
1616

1717
impl<A, T: Parent<Ty = A>> Parent for ParentWrapper<T> {
1818
//~^ ERROR the trait bound `<T as Parent>::Assoc: Child<A>` is not satisfied
19-
//~| ERROR the trait bound `<T as Parent>::Assoc: Child<A>` is not satisfied
2019
type Ty = A;
2120
type Assoc = ChildWrapper<T::Assoc>;
2221
//~^ ERROR the trait bound `<T as Parent>::Assoc: Child<A>` is not satisfied
22+
//~| ERROR the trait bound `<T as Parent>::Assoc: Child<A>` is not satisfied
2323
}
2424

2525
fn main() {}

src/test/ui/suggestions/missing-assoc-type-bound-restriction.stderr

+12-6
Original file line numberDiff line numberDiff line change
@@ -9,25 +9,31 @@ LL | impl<A, T: Parent<Ty = A>> Parent for ParentWrapper<T> {
99
| _|
1010
| |
1111
LL | |
12-
LL | |
1312
LL | | type Ty = A;
1413
LL | | type Assoc = ChildWrapper<T::Assoc>;
1514
LL | |
15+
LL | |
1616
LL | | }
1717
| |_^ the trait `Child<A>` is not implemented for `<T as Parent>::Assoc`
1818

1919
error[E0277]: the trait bound `<T as Parent>::Assoc: Child<A>` is not satisfied
20-
--> $DIR/missing-assoc-type-bound-restriction.rs:17:28
20+
--> $DIR/missing-assoc-type-bound-restriction.rs:20:5
2121
|
22+
LL | type Assoc: Child<Self::Ty>;
23+
| ----- associated type defined here
24+
...
2225
LL | impl<A, T: Parent<Ty = A>> Parent for ParentWrapper<T> {
23-
| ^^^^^^ - help: consider further restricting the associated type: `where <T as Parent>::Assoc: Child<A>`
24-
| |
25-
| the trait `Child<A>` is not implemented for `<T as Parent>::Assoc`
26+
| ------------------------------------------------------- help: consider further restricting the associated type: `where <T as Parent>::Assoc: Child<A>`
27+
| |
28+
| in this `impl` item
29+
...
30+
LL | type Assoc = ChildWrapper<T::Assoc>;
31+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Child<A>` is not implemented for `<T as Parent>::Assoc`
2632
|
2733
= note: required because of the requirements on the impl of `Child<A>` for `ChildWrapper<<T as Parent>::Assoc>`
2834

2935
error[E0277]: the trait bound `<T as Parent>::Assoc: Child<A>` is not satisfied
30-
--> $DIR/missing-assoc-type-bound-restriction.rs:21:5
36+
--> $DIR/missing-assoc-type-bound-restriction.rs:20:5
3137
|
3238
LL | trait Parent {
3339
| ------------ required by `Parent`

0 commit comments

Comments
 (0)