Closed
Description
This is a follow up on #67089, which now works. The following doesn't (play link):
#![feature(generic_associated_types)]
trait A {
type B<'a>;
fn make_b<'a>(&'a self) -> Self::B<'a>;
}
struct S {}
impl A for S {
type B<'a> = &'a S;
fn make_b<'a>(&'a self) -> &'a Self {
self
}
}
enum E<'a> {
S(<S as A>::B<'a>),
}
Error is:
18 | enum E<'a> {
| ^^ unused parameter
however, this lifetime clearly is used and is required.
Metadata
Metadata
Assignees
Labels
Area: Generic associated types (GATs)Area: Lifetimes / regionsArea: Lints (warnings about flaws in source code) such as unused_mut.Category: This is a bug.`#![feature(generic_associated_types)]` a.k.a. GATsRelevant to the compiler team, which will review and decide on the PR/issue.This issue requires a nightly compiler in some way.