summaryrefslogtreecommitdiffstats
path: root/tests/ui/impl-trait/in-trait/gat-outlives.rs
blob: 83dd6cfce53c524d75917fda065f1f3f71d9cd3f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// 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() {}