Closed
Description
#![feature(type_alias_impl_trait)]
trait Service {
type Output;
fn call(self) -> Self::Output;
}
impl<'a> Service for &'a str {
type Output = impl Sized;
fn call(self) -> Self::Output { self }
}
This compiles now but it shouldn't. Explicit annotation for captured lifetimes in the opaque type impl Sized + 'a
is required by the RFC.
I guess this is the root cause of #91601.
@rustbot label F-type_alias_impl_trait T-compiler
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Done