330727467b
Add bidirectional where clauses on RPITIT synthesized GATs Given the following: ```rust struct MyStruct<'a, T>(&'a T); trait MyTrait<'a, T> { fn my_fn<'b, 'c, 'd, V>(item: &'c String) -> impl Sized + 'a + 'b + 'c where V: 'b, V: 'd; } impl<'a, T> MyTrait<'a, T> for MyStruct<'a, T> { fn my_fn<'b, 'c, 'd, V>(_: &'c String) -> impl Sized + 'a + 'b + 'c where V: 'b, V: 'd, { unimplemented!(); } } ``` We need the desugaring to be: ```rust trait MyTrait<'a, T> { type MyFn<'bf, 'df, Vf, 'a2, 'b2, 'c2>: Sized + 'a2 + 'b2 + 'c2 where Vf: 'b2, 'a2: 'a, 'a: 'a2, 'b2: 'bf, 'bf: 'b2; fn my_fn<'b, 'c, 'd, V>(item: &'c String) -> MyStruct<'a>::MyFn<'b, 'd, V, 'a, 'b, 'c> where V: 'b, V: 'd { type opaque<'a3, 'b3, 'c3>; }; } impl<'a, T> MyIter<'a, T> for MyStruct<'a, T> { type MyFn<'bf, 'df, Vf, 'a2, 'b2, 'c2> = impl Sized + 'a2 + 'b2 + 'c2 where Vf: b2, 'a2: 'a, 'a: 'a2, 'b2: 'bf, 'bf: 'b2; fn my_fn<'b, 'c, 'd, V>(_: &'c String) -> MyStruct<'a>::MyFn<'a, 'b, 'c, V> where V: 'b, V: 'd { type opaque<'a3, 'b3, 'c3>; unimplemented!(); } } ``` This PR adds the where clauses for the `MyFn` generated GATs. This is a draft with a very ugly solution so we can make comments over concrete code. r? `@compiler-errors` |
||
---|---|---|
.. | ||
async-associated-types2.rs | ||
async-associated-types.rs | ||
async-default-fn-overridden.rs | ||
async-example-desugared-boxed-in-trait.current.stderr | ||
async-example-desugared-boxed-in-trait.next.stderr | ||
async-example-desugared-boxed-in-trait.rs | ||
async-example-desugared-boxed.current.stderr | ||
async-example-desugared-boxed.next.stderr | ||
async-example-desugared-boxed.rs | ||
async-example-desugared-extra.rs | ||
async-example-desugared-in-trait.rs | ||
async-example-desugared-manual.current.stderr | ||
async-example-desugared-manual.next.stderr | ||
async-example-desugared-manual.rs | ||
async-example-desugared.rs | ||
async-example.rs | ||
async-generics-and-bounds.current.stderr | ||
async-generics-and-bounds.next.stderr | ||
async-generics-and-bounds.rs | ||
async-generics.current.stderr | ||
async-generics.next.stderr | ||
async-generics.rs | ||
async-lifetimes-and-bounds.rs | ||
async-lifetimes.rs | ||
async-recursive-generic.current.stderr | ||
async-recursive-generic.next.stderr | ||
async-recursive-generic.rs | ||
async-recursive.current.stderr | ||
async-recursive.next.stderr | ||
async-recursive.rs | ||
bad-signatures.current.stderr | ||
bad-signatures.next.stderr | ||
bad-signatures.rs | ||
dont-project-to-specializable-projection.current.stderr | ||
dont-project-to-specializable-projection.next.stderr | ||
dont-project-to-specializable-projection.rs | ||
early-bound-1.rs | ||
early-bound-2.rs | ||
fn-not-async-err2.current.stderr | ||
fn-not-async-err2.next.stderr | ||
fn-not-async-err2.rs | ||
fn-not-async-err.rs | ||
fn-not-async-err.stderr | ||
generics-mismatch.current.stderr | ||
generics-mismatch.next.stderr | ||
generics-mismatch.rs | ||
generics-mismatch.stderr | ||
implied-bounds.rs | ||
issue-102138.rs | ||
issue-102219.rs | ||
issue-102310.rs | ||
issue-104678.rs | ||
lifetime-mismatch.current.stderr | ||
lifetime-mismatch.next.stderr | ||
lifetime-mismatch.rs | ||
missing-send-bound.current.stderr | ||
missing-send-bound.next.stderr | ||
missing-send-bound.rs | ||
nested-rpit.rs | ||
normalize-opaque-with-bound-vars.rs | ||
object-safety.current.stderr | ||
object-safety.next.stderr | ||
object-safety.rs | ||
return-type-suggestion.current.stderr | ||
return-type-suggestion.next.stderr | ||
return-type-suggestion.rs |