| 1 |
error[E0599]: the method `anyhow_kind` exists for reference `&Error`, but its trait bounds were not satisfied |
| 2 |
--> tests/ui/no-impl.rs:7:13 |
| 3 |
| |
| 4 |
4 | struct Error; |
| 5 |
| ------------ doesn't satisfy `Error: Into<anyhow::Error>`, `Error: anyhow::kind::TraitKind` or `Error: std::fmt::Display` |
| 6 |
... |
| 7 |
7 | let _ = anyhow!(Error); |
| 8 |
| ^^^^^^^^^^^^^^ method cannot be called on `&Error` due to unsatisfied trait bounds |
| 9 |
| |
| 10 |
= note: the following trait bounds were not satisfied: |
| 11 |
`Error: Into<anyhow::Error>` |
| 12 |
which is required by `Error: anyhow::kind::TraitKind` |
| 13 |
`Error: std::fmt::Display` |
| 14 |
which is required by `&Error: anyhow::kind::AdhocKind` |
| 15 |
`&Error: Into<anyhow::Error>` |
| 16 |
which is required by `&Error: anyhow::kind::TraitKind` |
| 17 |
note: the traits `Into` and `std::fmt::Display` must be implemented |
| 18 |
--> $RUST/core/src/fmt/mod.rs |
| 19 |
| |
| 20 |
| pub trait Display: PointeeSized { |
| 21 |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 22 |
| |
| 23 |
::: $RUST/core/src/convert/mod.rs |
| 24 |
| |
| 25 |
| pub const trait Into<T>: Sized { |
| 26 |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 27 |
= help: items from traits can only be used if the trait is implemented and in scope |
| 28 |
= note: the following traits define an item `anyhow_kind`, perhaps you need to implement one of them: |
| 29 |
candidate #1: `anyhow::kind::AdhocKind` |
| 30 |
candidate #2: `anyhow::kind::BoxedKind` |
| 31 |
candidate #3: `anyhow::kind::TraitKind` |
| 32 |
= note: this error originates in the macro `anyhow` (in Nightly builds, run with -Z macro-backtrace for more info) |