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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

20 lines
252 B
Rust
Raw Normal View History

// check-pass
2023-09-13 16:04:42 +00: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() {}