1error[E0599]: the method `as_display` exists for reference `&NoDisplay`, but its trait bounds were not satisfied 2 --> tests/ui/no-display.rs:7:9 3 | 44 | struct NoDisplay; 5 | ---------------- doesn't satisfy `NoDisplay: std::fmt::Display` 6... 77 | #[error("thread: {thread}")] 8 | ^^^^^^^^^^^^^^^^^^ method cannot be called on `&NoDisplay` due to unsatisfied trait bounds 9 | 10 = note: the following trait bounds were not satisfied: 11 `NoDisplay: std::fmt::Display` 12 which is required by `&NoDisplay: AsDisplay<'_>` 13note: the trait `std::fmt::Display` must be implemented 14 --> $RUST/core/src/fmt/mod.rs 15 | 16 | pub trait Display { 17 | ^^^^^^^^^^^^^^^^^ 18 = help: items from traits can only be used if the trait is implemented and in scope 19 = note: the following trait defines an item `as_display`, perhaps you need to implement it: 20 candidate #1: `AsDisplay` 21 22error[E0277]: the trait bound `NoDisplay: Octal` is not satisfied 23 --> tests/ui/no-display.rs:13:9 24 | 2512 | #[derive(Error, Debug)] 26 | ----- in this derive macro expansion 2713 | #[error("thread: {thread:o}")] 28 | ^^^^^^^^^^^^^^^^^^^^ the trait `Octal` is not implemented for `NoDisplay` 29 | 30 = help: the following other types implement trait `Octal`: 31 &T 32 &mut T 33 NonZero<T> 34 Saturating<T> 35 Wrapping<T> 36 i128 37 i16 38 i32 39 and $N others 40 = note: required for `&NoDisplay` to implement `Octal` 41note: required by a bound in `core::fmt::rt::Argument::<'_>::new_octal` 42 --> $RUST/core/src/fmt/rt.rs 43 | 44 | pub fn new_octal<T: Octal>(x: &T) -> Argument<'_> { 45 | ^^^^^ required by this bound in `Argument::<'_>::new_octal` 46 = note: this error originates in the macro `$crate::format_args` which comes from the expansion of the derive macro `Error` (in Nightly builds, run with -Z macro-backtrace for more info) 47