mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 09:14:20 +00:00
23 lines
381 B
Rust
23 lines
381 B
Rust
trait Trait<'a> {
|
|
type Out;
|
|
fn call(&'a self) -> Self::Out;
|
|
}
|
|
|
|
struct X(());
|
|
|
|
impl<'a> Trait<'a> for X {
|
|
type Out = ();
|
|
fn call(&'a self) -> Self::Out {
|
|
()
|
|
}
|
|
}
|
|
|
|
fn f() -> impl for<'a> Trait<'a, Out = impl Sized + 'a> {
|
|
//~^ ERROR higher kinded lifetime bounds on nested opaque types are not supported yet
|
|
X(())
|
|
}
|
|
|
|
fn main() {
|
|
let _ = f();
|
|
}
|