Closed
Description
openedon Oct 27, 2022
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Metadata
Assignees
Labels
Type
Projects
Status
Done