rust/tests/ui/impl-trait/in-trait/gat-outlives.rs

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

18 lines
329 B
Rust
Raw Normal View History

//@ edition: 2021
use std::future::Future;
trait Trait {
type Gat<'a>;
//~^ ERROR missing required bound on `Gat`
async fn foo(&self) -> Self::Gat<'_>;
}
trait Trait2 {
type Gat<'a>;
//~^ ERROR missing required bound on `Gat`
async fn foo(&self) -> impl Future<Output = Self::Gat<'_>>;
}
fn main() {}