Compilation error: no method named `status` found for reference `&impl Debug + std::fmt::Display`
Ploppz opened this issue · comments
error[E0599]: no method named `status` found for reference `&impl Debug + std::fmt::Display` in the current scope
--> /home/erlend/.cargo/registry/src/github.com-1ecc6299db9ec823/http-types-2.12.0/src/error.rs:113:70
|
113 | if let std::backtrace::BacktraceStatus::Captured = backtrace.status() {
| ^^^^^^ method not found in `&impl Debug + std::fmt::Display`
|
= help: items from traits can only be used if the trait is implemented and in scope
note: `Status` defines an item `status`, perhaps you need to implement it
--> /home/erlend/.cargo/registry/src/github.com-1ecc6299db9ec823/http-types-2.12.0/src/status.rs:9:1
|
9 | pub trait Status<T, E>: private::Sealed {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0308]: mismatched types
--> /home/erlend/.cargo/registry/src/github.com-1ecc6299db9ec823/http-types-2.12.0/src/error.rs:114:18
|
114 | Some(backtrace)
| ---- ^^^^^^^^^ expected struct `Backtrace`, found opaque type
| |
| arguments to this enum variant are incorrect
|
::: /home/erlend/.cargo/registry/src/github.com-1ecc6299db9ec823/anyhow-1.0.65/src/error.rs:363:33
|
363 | pub fn backtrace(&self) -> &impl_backtrace!() {
| ----------------- the found opaque type
|
= note: expected reference `&Backtrace`
found reference `&impl Debug + std::fmt::Display`
Compiler version: rustc 1.63.0-nightly (b2eed72a6 2022-05-22)
Part of dependency tree:
http-types v2.12.0
├── anyhow v1.0.65
│ └── backtrace v0.3.66
Solved by updating compiler. I was on nightly 1.63