-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
C-bugCategory: This is a bug.Category: This is a bug.F-type_alias_impl_trait`#[feature(type_alias_impl_trait)]``#[feature(type_alias_impl_trait)]`T-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.T-typesRelevant to the types team, which will review and decide on the PR/issue.Relevant to the types team, which will review and decide on the PR/issue.
Description
This code should pass but it doesn't:
#![feature(type_alias_impl_trait)]
trait Callable {
type Output;
fn call() -> Self::Output;
}
impl<'a> Callable for &'a () {
type Output = impl Sized;
fn call() -> Self::Output {}
}
fn test<'a>() -> impl Sized {
<&'a () as Callable>::call()
//~^ ERROR hidden type captures lifetime that does not appear in bounds
}
This is #96996 resurrected. Cc @oli-obk.
@rustbot label F-type_alias_impl_trait C-bug T-compiler T-types
Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.F-type_alias_impl_trait`#[feature(type_alias_impl_trait)]``#[feature(type_alias_impl_trait)]`T-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.T-typesRelevant to the types team, which will review and decide on the PR/issue.Relevant to the types team, which will review and decide on the PR/issue.
Type
Projects
Status
Done