-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Open
Labels
A-GATsArea: Generic associated types (GATs)Area: Generic associated types (GATs)A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsGATs-triagedIssues using the `generic_associated_types` feature that have been triagedIssues using the `generic_associated_types` feature that have been triagedT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
Relates to #89970 and potentially to #90808.
#![feature(generic_associated_types)]
trait MyTrait {
type AT<'a> where Self: 'a;
fn selfreffing<'a>(&'a self) -> Self::AT<'a> { unimplemented!(); }
}
struct Inner;
impl MyTrait for Inner {
type AT<'b> where Self: 'b = ();
}
struct Outer<'a, T>(&'a T);
impl<'a, T: MyTrait> MyTrait for Outer<'a, T> {
type AT<'b> = T::AT<'b>;
// type AT<'b> where T: 'b = T::AT<'b>; // suggested
// type AT<'b> where Self: 'b = T::AT<'b>; // compiles
}
Metadata
Metadata
Assignees
Labels
A-GATsArea: Generic associated types (GATs)Area: Generic associated types (GATs)A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsGATs-triagedIssues using the `generic_associated_types` feature that have been triagedIssues using the `generic_associated_types` feature that have been triagedT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.