diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ui-fulldeps/session-diagnostic/diagnostic-derive.stderr | 6 | ||||
| -rw-r--r-- | tests/ui/macros/missing-derive-3.stderr | 15 |
2 files changed, 21 insertions, 0 deletions
diff --git a/tests/ui-fulldeps/session-diagnostic/diagnostic-derive.stderr b/tests/ui-fulldeps/session-diagnostic/diagnostic-derive.stderr index 001699b2bc7..396abb001ce 100644 --- a/tests/ui-fulldeps/session-diagnostic/diagnostic-derive.stderr +++ b/tests/ui-fulldeps/session-diagnostic/diagnostic-derive.stderr @@ -559,6 +559,12 @@ error: cannot find attribute `error` in this scope | LL | #[error(no_crate_example, code = E0123)] | ^^^^^ + | +help: `error` is an attribute that can be used by the derive macro `Error`, you might be missing a `derive` attribute + | +LL + #[derive(Error)] +LL | struct ErrorAttribute {} + | error: cannot find attribute `warn_` in this scope --> $DIR/diagnostic-derive.rs:590:3 diff --git a/tests/ui/macros/missing-derive-3.stderr b/tests/ui/macros/missing-derive-3.stderr index 0a7ed8d0876..9ece0d3ba39 100644 --- a/tests/ui/macros/missing-derive-3.stderr +++ b/tests/ui/macros/missing-derive-3.stderr @@ -3,6 +3,11 @@ error: cannot find attribute `sede` in this scope | LL | #[sede(untagged)] | ^^^^ + | +help: the derive macros `Deserialize` and `Serialize` accept the similarly named `serde` attribute + | +LL | #[serde(untagged)] + | + error: cannot find attribute `serde` in this scope --> $DIR/missing-derive-3.rs:14:7 @@ -15,6 +20,11 @@ note: `serde` is imported here, but it is a crate, not an attribute | LL | extern crate serde; | ^^^^^^^^^^^^^^^^^^^ +help: `serde` is an attribute that can be used by the derive macros `Deserialize` and `Serialize`, you might be missing a `derive` attribute + | +LL + #[derive(Deserialize, Serialize)] +LL | enum B { + | error: cannot find attribute `serde` in this scope --> $DIR/missing-derive-3.rs:6:3 @@ -27,6 +37,11 @@ note: `serde` is imported here, but it is a crate, not an attribute | LL | extern crate serde; | ^^^^^^^^^^^^^^^^^^^ +help: `serde` is an attribute that can be used by the derive macros `Deserialize` and `Serialize`, you might be missing a `derive` attribute + | +LL + #[derive(Deserialize, Serialize)] +LL | enum A { + | error: aborting due to 3 previous errors |
