|
1 | 1 | error[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 |
| - | |
4 |
| -4 | pub struct NotError; |
5 |
| - | ------------------- |
6 |
| - | | |
7 |
| - | doesn't satisfy `NotError: AsDynError<'_>` |
8 |
| - | doesn't satisfy `NotError: std::error::Error` |
| 2 | + --> tests/ui/source-enum-not-error.rs:9:14 |
| 3 | + | |
| 4 | +4 | pub struct NotError; |
| 5 | + | ------------------- |
| 6 | + | | |
| 7 | + | doesn't satisfy `NotError: AsDynError<'_>` |
| 8 | + | doesn't satisfy `NotError: std::error::Error` |
9 | 9 | ...
|
10 |
| -10 | 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<'_>` |
| 10 | +9 | Broken { 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<'_>` |
18 | 18 | note: the trait `std::error::Error` must be implemented
|
19 |
| - --> $RUST/core/src/error.rs |
20 |
| - | |
21 |
| - | pub trait Error: Debug + Display { |
22 |
| - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 19 | + --> $RUST/core/src/error.rs |
| 20 | + | |
| 21 | + | pub trait Error: Debug + Display { |
| 22 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
0 commit comments