@@ -25,15 +25,16 @@ error[E0277]: the trait bound `&mut bool: __private::not::Bool` is not satisfied
2525 | | the trait `__private::not::Bool` is not implemented for `&mut bool`
2626 | required by a bound introduced by this call
2727 |
28- = help: the following other types implement trait `__private::not::Bool`:
29- &bool
30- bool
3128 = note: `__private::not::Bool` is implemented for `&bool`, but not for `&mut bool`
3229note: required by a bound in `anyhow::__private::not`
3330 --> src/lib.rs
3431 |
3532 | pub fn not(cond: impl Bool) -> bool {
3633 | ^^^^ required by this bound in `not`
34+ help: consider dereferencing here
35+ |
36+ 29 | Bool(cond) => ensure!(*cond),
37+ | +
3738
3839error[E0277]: the trait bound `DerefBool: __private::not::Bool` is not satisfied
3940 --> tests/ui/ensure-nonbool.rs:33:13
@@ -44,14 +45,15 @@ error[E0277]: the trait bound `DerefBool: __private::not::Bool` is not satisfied
4445 | | the trait `__private::not::Bool` is not implemented for `DerefBool`
4546 | required by a bound introduced by this call
4647 |
47- = help: the following other types implement trait `__private::not::Bool`:
48- &bool
49- bool
5048note: required by a bound in `anyhow::__private::not`
5149 --> src/lib.rs
5250 |
5351 | pub fn not(cond: impl Bool) -> bool {
5452 | ^^^^ required by this bound in `not`
53+ help: consider dereferencing here
54+ |
55+ 33 | ensure!(*db);
56+ | +
5557
5658error[E0277]: the trait bound `&DerefBool: __private::not::Bool` is not satisfied
5759 --> tests/ui/ensure-nonbool.rs:34:13
0 commit comments