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
289 B
Rust
Raw Normal View History

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