summaryrefslogtreecommitdiffstats
path: root/src/test/ui/associated-types/issue-59324.rs
blob: 9e68e9e77515bc6633b0ad3e8a603f98c765d587 (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
    //~| ERROR the trait bound `Bug: Foo` is not satisfied
        &self,
    ) -> Self::AssocType;
}

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

fn main() {}