2023-06-14 00:20:31 -05:00
|
|
|
#![feature(return_position_impl_trait_in_trait)]
|
|
|
|
|
|
|
|
trait Foo {
|
|
|
|
fn test() -> impl Sized;
|
|
|
|
}
|
|
|
|
|
|
|
|
impl<'a, T> Foo for T {
|
|
|
|
//~^ ERROR the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates
|
|
|
|
|
2023-06-23 22:00:08 -05:00
|
|
|
fn test() -> &'a () {
|
|
|
|
&()
|
|
|
|
}
|
2023-06-14 00:20:31 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|