rust/tests/ui/unsized/issue-75707.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

18 lines
286 B
Rust
Raw Normal View History

2020-10-14 18:36:16 -05:00
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
}