1error[E0599]: the method `as_dyn_error` exists for reference `&NotError`, but its trait bounds were not satisfied
2  --> tests/ui/source-enum-not-error.rs:10:9
3   |
44  | pub struct NotError;
5   | -------------------
6   | |
7   | doesn't satisfy `NotError: AsDynError<'_>`
8   | doesn't satisfy `NotError: std::error::Error`
9...
1010 |         source: NotError,
11   |         ^^^^^^ method cannot be called on `&NotError` due to unsatisfied trait bounds
12   |
13   = note: the following trait bounds were not satisfied:
14           `NotError: std::error::Error`
15           which is required by `NotError: AsDynError<'_>`
16           `&NotError: std::error::Error`
17           which is required by `&NotError: AsDynError<'_>`
18note: the trait `std::error::Error` must be implemented
19  --> $RUST/core/src/error.rs
20   |
21   | pub trait Error: Debug + Display {
22   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
23