| 1 |
error[E0599]: the method `as_dyn_error` exists for struct `String`, but its trait bounds were not satisfied |
| 2 |
--> tests/ui/transparent-struct-unnamed-field-not-error.rs:4:9 |
| 3 |
| |
| 4 |
4 | #[error(transparent)] |
| 5 |
| ^^^^^^^^^^^ method cannot be called on `String` due to unsatisfied trait bounds |
| 6 |
| |
| 7 |
::: $RUST/alloc/src/string.rs |
| 8 |
| |
| 9 |
| pub struct String { |
| 10 |
| ----------------- doesn't satisfy `String: AsDynError<'_>` or `String: std::error::Error` |
| 11 |
| |
| 12 |
= note: the following trait bounds were not satisfied: |
| 13 |
`String: std::error::Error` |
| 14 |
which is required by `String: AsDynError<'_>` |
| 15 |
`str: Sized` |
| 16 |
which is required by `str: AsDynError<'_>` |
| 17 |
`str: std::error::Error` |
| 18 |
which is required by `str: AsDynError<'_>` |