]> git.lizzy.rs Git - rust.git/blob - tests/ui/associated-types/issue-59324.rs
Rollup merge of #106427 - mejrs:translation_errors, r=davidtwco
[rust.git] / tests / ui / associated-types / issue-59324.rs
1 trait NotFoo {}
2
3 pub trait Foo: NotFoo {
4     type OnlyFoo;
5 }
6
7 pub trait Service {
8     type AssocType;
9 }
10
11 pub trait ThriftService<Bug: NotFoo>:
12 //~^ ERROR the trait bound `Bug: Foo` is not satisfied
13 //~| ERROR the trait bound `Bug: Foo` is not satisfied
14     Service<AssocType = <Bug as Foo>::OnlyFoo>
15 {
16     fn get_service(
17     //~^ ERROR the trait bound `Bug: Foo` is not satisfied
18         &self,
19     ) -> Self::AssocType;
20     //~^ ERROR the trait bound `Bug: Foo` is not satisfied
21 }
22
23 fn with_factory<H>(factory: dyn ThriftService<()>) {}
24 //~^ ERROR the trait bound `(): Foo` is not satisfied
25
26 fn main() {}