rust/tests/ui/impl-trait/in-trait/lifetime-in-associated-trait-bound.rs
2024-02-16 20:02:50 +00:00

20 lines
253 B
Rust

//@ check-pass
#![feature(associated_type_bounds)]
trait Trait {
type Type;
fn method(&self) -> impl Trait<Type: '_>;
}
impl Trait for () {
type Type = ();
fn method(&self) -> impl Trait<Type: '_> {
()
}
}
fn main() {}