1error[E0599]: the method `as_dyn_error` exists for struct `NotError`, but its trait bounds were not satisfied 2 --> tests/ui/source-struct-unnamed-field-not-error.rs:8:24 3 | 44 | struct NotError; 5 | --------------- method `as_dyn_error` not found for this struct because it doesn't satisfy `NotError: AsDynError<'_>` or `NotError: std::error::Error` 6... 78 | pub struct ErrorStruct(#[source] NotError); 8 | ^^^^^^^^^ method cannot be called on `NotError` due to unsatisfied trait bounds 9 | 10 = note: the following trait bounds were not satisfied: 11 `NotError: std::error::Error` 12 which is required by `NotError: AsDynError<'_>` 13note: the trait `std::error::Error` must be implemented 14 --> $RUST/core/src/error.rs 15 | 16 | pub trait Error: Debug + 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_dyn_error`, perhaps you need to implement it: 20 candidate #1: `AsDynError` 21