blob: 9f04cdbb92211fa994b81d75cc6e24cf4082ec4a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
pub trait Callback {
fn cb();
}
pub trait Processing {
type Call: Callback;
}
fn f<P: Processing + ?Sized>() {
P::Call::cb();
}
fn main() {
struct MyCall;
f::<dyn Processing<Call = MyCall>>();
//~^ ERROR: the trait bound `MyCall: Callback` is not satisfied
}
|