rust/tests/ui/impl-trait/in-trait/lifetime-in-associated-trait-bound.rs

20 lines
252 B
Rust
Raw Normal View History

// check-pass
2023-09-13 11:04:42 -05:00
#![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() {}