File tree 2 files changed +29
-0
lines changed
2 files changed +29
-0
lines changed Original file line number Diff line number Diff line change
1
+ pub trait Callback {
2
+ fn cb ( ) ;
3
+ }
4
+
5
+ pub trait Processing {
6
+ type Call : Callback ;
7
+ }
8
+
9
+ fn f < P : Processing + ?Sized > ( ) {
10
+ P :: Call :: cb ( ) ;
11
+ }
12
+
13
+ fn main ( ) {
14
+ struct MyCall ;
15
+ f :: < dyn Processing < Call = MyCall > > ( ) ;
16
+ //~^ ERROR: the trait bound `MyCall: Callback` is not satisfied
17
+ }
Original file line number Diff line number Diff line change
1
+ error[E0277]: the trait bound `MyCall: Callback` is not satisfied
2
+ --> $DIR/issue-75707.rs:15:5
3
+ |
4
+ LL | fn f<P: Processing + ?Sized>() {
5
+ | ---------- required by this bound in `f`
6
+ ...
7
+ LL | f::<dyn Processing<Call = MyCall>>();
8
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Callback` is not implemented for `MyCall`
9
+
10
+ error: aborting due to previous error
11
+
12
+ For more information about this error, try `rustc --explain E0277`.
You can’t perform that action at this time.
0 commit comments