@@ -19,11 +19,11 @@ help: consider further restricting type parameter `F` with trait `MyFn`
19
19
LL | F: Callback<Self::CallbackArg> + MyFn<i32>,
20
20
| +++++++++++
21
21
22
- error[E0277]: the trait bound `F: MyFn <i32>` is not satisfied
23
- --> $DIR/false-positive-predicate-entailment-error.rs:36:30
22
+ error[E0277]: the trait bound `F: Callback <i32>` is not satisfied
23
+ --> $DIR/false-positive-predicate-entailment-error.rs:42:12
24
24
|
25
- LL | fn autobatch<F>(self) -> impl Trait
26
- | ^^^^^^^^^^ the trait `MyFn<i32>` is not implemented for `F`
25
+ LL | F: Callback<Self::CallbackArg>,
26
+ | ^^^^^^^^^^^^^^^^^ ^^^^^^^^^^ the trait `MyFn<i32>` is not implemented for `F`
27
27
|
28
28
note: required for `F` to implement `Callback<i32>`
29
29
--> $DIR/false-positive-predicate-entailment-error.rs:14:21
@@ -32,14 +32,14 @@ LL | impl<A, F: MyFn<A>> Callback<A> for F {
32
32
| ------- ^^^^^^^^^^^ ^
33
33
| |
34
34
| unsatisfied trait bound introduced here
35
- note: required by a bound in `<Sender as ChannelSender>:: autobatch`
36
- --> $DIR/false-positive-predicate-entailment-error.rs:43:12
35
+ note: the requirement `F: Callback<i32>` appears on the `impl`'s method ` autobatch` but not on the corresponding trait's method
36
+ --> $DIR/false-positive-predicate-entailment-error.rs:25:8
37
37
|
38
- LL | fn autobatch<F>(self) -> impl Trait
39
- | --------- required by a bound in this associated function
38
+ LL | trait ChannelSender {
39
+ | ------------- in this trait
40
40
...
41
- LL | F: Callback<Self::CallbackArg>,
42
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `<Sender as ChannelSender>::autobatch `
41
+ LL | fn autobatch<F>(self) -> impl Trait
42
+ | ^^^^^^^^^ this trait's method doesn't have the requirement `F: Callback<i32> `
43
43
help: consider further restricting type parameter `F` with trait `MyFn`
44
44
|
45
45
LL | F: Callback<Self::CallbackArg> + MyFn<i32>,
@@ -118,7 +118,7 @@ LL | F: Callback<Self::CallbackArg> + MyFn<i32>,
118
118
| +++++++++++
119
119
120
120
error[E0277]: the trait bound `F: MyFn<i32>` is not satisfied
121
- --> $DIR/false-positive-predicate-entailment-error.rs:43 :12
121
+ --> $DIR/false-positive-predicate-entailment-error.rs:42 :12
122
122
|
123
123
LL | F: Callback<Self::CallbackArg>,
124
124
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `MyFn<i32>` is not implemented for `F`
0 commit comments