| 1 |
error[E0277]: the trait bound `&str: __private::not::Bool` is not satisfied |
| 2 |
--> tests/ui/ensure-nonbool.rs:25:13 |
| 3 |
| |
| 4 |
25 | ensure!("..."); |
| 5 |
| --------^^^^^- |
| 6 |
| | | |
| 7 |
| | the trait `__private::not::Bool` is not implemented for `&str` |
| 8 |
| required by a bound introduced by this call |
| 9 |
| |
| 10 |
= help: the following other types implement trait `__private::not::Bool`: |
| 11 |
&bool |
| 12 |
bool |
| 13 |
note: required by a bound in `anyhow::__private::not` |
| 14 |
--> src/lib.rs |
| 15 |
| |
| 16 |
| pub fn not(cond: impl Bool) -> bool { |
| 17 |
| ^^^^ required by this bound in `not` |
| 18 |
|
| 19 |
error[E0277]: the trait bound `&mut bool: __private::not::Bool` is not satisfied |
| 20 |
--> tests/ui/ensure-nonbool.rs:29:31 |
| 21 |
| |
| 22 |
29 | Bool(cond) => ensure!(cond), |
| 23 |
| --------^^^^- |
| 24 |
| | | |
| 25 |
| | the trait `__private::not::Bool` is not implemented for `&mut bool` |
| 26 |
| required by a bound introduced by this call |
| 27 |
| |
| 28 |
= note: `__private::not::Bool` is implemented for `&bool`, but not for `&mut bool` |
| 29 |
note: required by a bound in `anyhow::__private::not` |
| 30 |
--> src/lib.rs |
| 31 |
| |
| 32 |
| pub fn not(cond: impl Bool) -> bool { |
| 33 |
| ^^^^ required by this bound in `not` |
| 34 |
help: consider dereferencing here |
| 35 |
| |
| 36 |
29 | Bool(cond) => ensure!(*cond), |
| 37 |
| + |
| 38 |
|
| 39 |
error[E0277]: the trait bound `DerefBool: __private::not::Bool` is not satisfied |
| 40 |
--> tests/ui/ensure-nonbool.rs:33:13 |
| 41 |
| |
| 42 |
33 | ensure!(db); |
| 43 |
| --------^^- |
| 44 |
| | | |
| 45 |
| | unsatisfied trait bound |
| 46 |
| required by a bound introduced by this call |
| 47 |
| |
| 48 |
help: the trait `__private::not::Bool` is not implemented for `DerefBool` |
| 49 |
--> tests/ui/ensure-nonbool.rs:6:1 |
| 50 |
| |
| 51 |
6 | struct DerefBool(bool); |
| 52 |
| ^^^^^^^^^^^^^^^^ |
| 53 |
note: required by a bound in `anyhow::__private::not` |
| 54 |
--> src/lib.rs |
| 55 |
| |
| 56 |
| pub fn not(cond: impl Bool) -> bool { |
| 57 |
| ^^^^ required by this bound in `not` |
| 58 |
help: consider dereferencing here |
| 59 |
| |
| 60 |
33 | ensure!(*db); |
| 61 |
| + |
| 62 |
|
| 63 |
error[E0277]: the trait bound `&DerefBool: __private::not::Bool` is not satisfied |
| 64 |
--> tests/ui/ensure-nonbool.rs:34:13 |
| 65 |
| |
| 66 |
34 | ensure!(&db); |
| 67 |
| --------^^^- |
| 68 |
| | | |
| 69 |
| | the trait `__private::not::Bool` is not implemented for `&DerefBool` |
| 70 |
| required by a bound introduced by this call |
| 71 |
| |
| 72 |
note: required by a bound in `anyhow::__private::not` |
| 73 |
--> src/lib.rs |
| 74 |
| |
| 75 |
| pub fn not(cond: impl Bool) -> bool { |
| 76 |
| ^^^^ required by this bound in `not` |
| 77 |
help: consider dereferencing here |
| 78 |
| |
| 79 |
34 | ensure!(&*db); |
| 80 |
| + |
| 81 |
|
| 82 |
error[E0277]: the trait bound `NotBool: __private::not::Bool` is not satisfied |
| 83 |
--> tests/ui/ensure-nonbool.rs:37:13 |
| 84 |
| |
| 85 |
37 | ensure!(nb); |
| 86 |
| --------^^- |
| 87 |
| | | |
| 88 |
| | unsatisfied trait bound |
| 89 |
| required by a bound introduced by this call |
| 90 |
| |
| 91 |
help: the trait `__private::not::Bool` is not implemented for `NotBool` |
| 92 |
--> tests/ui/ensure-nonbool.rs:8:1 |
| 93 |
| |
| 94 |
8 | struct NotBool(bool); |
| 95 |
| ^^^^^^^^^^^^^^ |
| 96 |
= help: the following other types implement trait `__private::not::Bool`: |
| 97 |
&bool |
| 98 |
bool |
| 99 |
note: required by a bound in `anyhow::__private::not` |
| 100 |
--> src/lib.rs |
| 101 |
| |
| 102 |
| pub fn not(cond: impl Bool) -> bool { |
| 103 |
| ^^^^ required by this bound in `not` |