File tree 2 files changed +4
-4
lines changed
src/test/ui/generic-associated-types
2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 1
1
error[E0275]: overflow evaluating the requirement `<T as Foo>::Item: Sized`
2
2
--> $DIR/projection-bound-cycle-generic.rs:44:18
3
3
|
4
- LL | struct OnlySized<T> where T : Sized { f: T }
5
- | - required by this bound in `OnlySized `
4
+ LL | type Item : Sized where <Self as Foo>::Item: Sized;
5
+ | ----- required by this bound in `Foo::Item `
6
6
...
7
7
LL | type Assoc = OnlySized<<T as Foo>::Item>;
8
8
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
Original file line number Diff line number Diff line change 1
1
error[E0275]: overflow evaluating the requirement `<T as Foo>::Item: Sized`
2
2
--> $DIR/projection-bound-cycle.rs:46:18
3
3
|
4
- LL | struct OnlySized<T> where T : Sized { f: T }
5
- | - required by this bound in `OnlySized `
4
+ LL | type Item : Sized where <Self as Foo>::Item: Sized;
5
+ | ----- required by this bound in `Foo::Item `
6
6
...
7
7
LL | type Assoc = OnlySized<<T as Foo>::Item>;
8
8
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
You can’t perform that action at this time.
0 commit comments