summaryrefslogtreecommitdiffstats
path: root/src/test/ui/associated-types/issue-59324.rs
blob: 162f9e00edd81a369cfe739569cd28af4c81afe1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
trait NotFoo {}

pub trait Foo: NotFoo {
    type OnlyFoo;
}

pub trait Service {
    type AssocType;
}

pub trait ThriftService<Bug: NotFoo>:
//~^ ERROR the trait bound `Bug: Foo` is not satisfied
//~| ERROR the trait bound `Bug: Foo` is not satisfied
    Service<AssocType = <Bug as Foo>::OnlyFoo>
{
    fn get_service(
    //~^ ERROR the trait bound `Bug: Foo` is not satisfied
        &self,
    ) -> Self::AssocType;
    //~^ the trait bound `Bug: Foo` is not satisfied
}

fn with_factory<H>(factory: dyn ThriftService<()>) {}
//~^ ERROR the trait bound `(): Foo` is not satisfied

fn main() {}