blob: 9d4c7cb39ae9eb9470538302e1be4c988e1e6165 (
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
27
28
29
|
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
Service<AssocType = <Bug as Foo>::OnlyFoo>
//~^ ERROR the trait bound `Bug: Foo` is not satisfied
{
fn get_service(
//~^ ERROR the trait bound `Bug: Foo` is not satisfied
//~| ERROR the trait bound `Bug: Foo` is not satisfied
&self,
) -> Self::AssocType;
//~^ ERROR the trait bound `Bug: Foo` is not satisfied
}
fn with_factory<H>(factory: dyn ThriftService<()>) {}
//~^ ERROR the trait bound `(): Foo` is not satisfied
//~| ERROR the trait bound `(): Foo` is not satisfied
//~| ERROR cannot be known at compilation time
fn main() {}
|