diff options
Diffstat (limited to 'tests/ui/unsized/issue-75707.rs')
-rw-r--r-- | tests/ui/unsized/issue-75707.rs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/ui/unsized/issue-75707.rs b/tests/ui/unsized/issue-75707.rs new file mode 100644 index 000000000..9f04cdbb9 --- /dev/null +++ b/tests/ui/unsized/issue-75707.rs @@ -0,0 +1,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 +} |