2022-09-18 15:46:56 +00:00
|
|
|
error: `#[derive(Diagnostic)]` can only be used on structs
|
2022-06-29 08:21:44 +00:00
|
|
|
--> $DIR/diagnostic-derive.rs:39:1
|
2020-08-27 10:00:21 +00:00
|
|
|
|
|
2022-08-19 13:40:48 +00:00
|
|
|
LL | / #[diag(typeck::ambiguous_lifetime_bound, code = "E0123")]
|
2020-11-18 10:18:40 +00:00
|
|
|
LL | |
|
2022-09-18 15:46:56 +00:00
|
|
|
LL | | enum DiagnosticOnEnum {
|
2020-11-18 10:18:40 +00:00
|
|
|
LL | | Foo,
|
|
|
|
LL | | Bar,
|
|
|
|
LL | | }
|
|
|
|
| |_^
|
2020-08-27 10:00:21 +00:00
|
|
|
|
2022-08-19 13:40:48 +00:00
|
|
|
error: `#[diag = ...]` is not a valid attribute
|
2022-06-29 08:21:44 +00:00
|
|
|
--> $DIR/diagnostic-derive.rs:48:1
|
2020-08-27 10:00:21 +00:00
|
|
|
|
|
2022-08-19 13:40:48 +00:00
|
|
|
LL | #[diag = "E0123"]
|
|
|
|
| ^^^^^^^^^^^^^^^^^
|
2022-03-31 07:35:17 +00:00
|
|
|
|
2022-04-27 03:06:13 +00:00
|
|
|
error: `#[nonsense(...)]` is not a valid attribute
|
2022-06-29 08:21:44 +00:00
|
|
|
--> $DIR/diagnostic-derive.rs:53:1
|
2022-03-31 07:35:17 +00:00
|
|
|
|
|
2022-06-23 13:51:44 +00:00
|
|
|
LL | #[nonsense(typeck::ambiguous_lifetime_bound, code = "E0123")]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2022-04-27 03:06:13 +00:00
|
|
|
|
|
2022-08-24 15:57:10 +00:00
|
|
|
= help: only `diag`, `help`, `note` and `warning` are valid attributes
|
2022-03-31 07:35:17 +00:00
|
|
|
|
2022-08-19 13:02:10 +00:00
|
|
|
error: diagnostic slug not specified
|
2022-06-29 08:21:44 +00:00
|
|
|
--> $DIR/diagnostic-derive.rs:53:1
|
2022-03-31 07:35:17 +00:00
|
|
|
|
|
2022-06-23 13:51:44 +00:00
|
|
|
LL | / #[nonsense(typeck::ambiguous_lifetime_bound, code = "E0123")]
|
2022-03-31 07:35:17 +00:00
|
|
|
LL | |
|
|
|
|
LL | |
|
|
|
|
LL | |
|
|
|
|
LL | | struct InvalidStructAttr {}
|
|
|
|
| |___________________________^
|
|
|
|
|
|
2022-08-19 13:02:10 +00:00
|
|
|
= help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(typeck::example_error)]`
|
2022-03-31 07:35:17 +00:00
|
|
|
|
2022-08-19 13:40:48 +00:00
|
|
|
error: `#[diag("...")]` is not a valid attribute
|
|
|
|
--> $DIR/diagnostic-derive.rs:60:8
|
2022-03-31 07:35:17 +00:00
|
|
|
|
|
2022-08-19 13:40:48 +00:00
|
|
|
LL | #[diag("E0123")]
|
|
|
|
| ^^^^^^^
|
2022-06-23 13:51:44 +00:00
|
|
|
|
|
|
|
|
= help: first argument of the attribute should be the diagnostic slug
|
2022-03-31 07:35:17 +00:00
|
|
|
|
2022-06-23 13:51:44 +00:00
|
|
|
error: diagnostic slug not specified
|
2022-06-29 08:21:44 +00:00
|
|
|
--> $DIR/diagnostic-derive.rs:60:1
|
2022-03-31 07:35:17 +00:00
|
|
|
|
|
2022-08-19 13:40:48 +00:00
|
|
|
LL | / #[diag("E0123")]
|
2022-03-31 07:35:17 +00:00
|
|
|
LL | |
|
|
|
|
LL | |
|
|
|
|
LL | | struct InvalidLitNestedAttr {}
|
|
|
|
| |______________________________^
|
|
|
|
|
|
2022-08-19 13:02:10 +00:00
|
|
|
= help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(typeck::example_error)]`
|
2022-03-31 07:35:17 +00:00
|
|
|
|
2022-08-19 13:40:48 +00:00
|
|
|
error: `#[diag(nonsense(...))]` is not a valid attribute
|
|
|
|
--> $DIR/diagnostic-derive.rs:71:8
|
2022-03-31 07:35:17 +00:00
|
|
|
|
|
2022-08-19 13:40:48 +00:00
|
|
|
LL | #[diag(nonsense("foo"), code = "E0123", slug = "foo")]
|
|
|
|
| ^^^^^^^^^^^^^^^
|
2022-06-23 13:51:44 +00:00
|
|
|
|
|
|
|
|
= help: first argument of the attribute should be the diagnostic slug
|
|
|
|
|
|
|
|
error: diagnostic slug not specified
|
2022-06-29 08:21:44 +00:00
|
|
|
--> $DIR/diagnostic-derive.rs:71:1
|
2022-06-23 13:51:44 +00:00
|
|
|
|
|
2022-08-19 13:40:48 +00:00
|
|
|
LL | / #[diag(nonsense("foo"), code = "E0123", slug = "foo")]
|
2022-06-23 13:51:44 +00:00
|
|
|
LL | |
|
|
|
|
LL | |
|
|
|
|
LL | | struct InvalidNestedStructAttr1 {}
|
|
|
|
| |__________________________________^
|
|
|
|
|
|
2022-08-19 13:02:10 +00:00
|
|
|
= help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(typeck::example_error)]`
|
2022-03-31 07:35:17 +00:00
|
|
|
|
2022-08-19 13:40:48 +00:00
|
|
|
error: `#[diag(nonsense = ...)]` is not a valid attribute
|
|
|
|
--> $DIR/diagnostic-derive.rs:77:8
|
2022-03-31 07:35:17 +00:00
|
|
|
|
|
2022-08-19 13:40:48 +00:00
|
|
|
LL | #[diag(nonsense = "...", code = "E0123", slug = "foo")]
|
|
|
|
| ^^^^^^^^^^^^^^^^
|
2022-04-27 03:06:13 +00:00
|
|
|
|
|
2022-06-23 13:51:44 +00:00
|
|
|
= help: first argument of the attribute should be the diagnostic slug
|
|
|
|
|
|
|
|
error: diagnostic slug not specified
|
2022-06-29 08:21:44 +00:00
|
|
|
--> $DIR/diagnostic-derive.rs:77:1
|
2022-06-23 13:51:44 +00:00
|
|
|
|
|
2022-08-19 13:40:48 +00:00
|
|
|
LL | / #[diag(nonsense = "...", code = "E0123", slug = "foo")]
|
2022-06-23 13:51:44 +00:00
|
|
|
LL | |
|
|
|
|
LL | |
|
|
|
|
LL | | struct InvalidNestedStructAttr2 {}
|
|
|
|
| |__________________________________^
|
|
|
|
|
|
2022-08-19 13:02:10 +00:00
|
|
|
= help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(typeck::example_error)]`
|
2022-03-31 07:35:17 +00:00
|
|
|
|
2022-08-19 13:40:48 +00:00
|
|
|
error: `#[diag(nonsense = ...)]` is not a valid attribute
|
|
|
|
--> $DIR/diagnostic-derive.rs:83:8
|
2022-03-31 07:35:17 +00:00
|
|
|
|
|
2022-08-19 13:40:48 +00:00
|
|
|
LL | #[diag(nonsense = 4, code = "E0123", slug = "foo")]
|
|
|
|
| ^^^^^^^^^^^^
|
2022-06-23 13:51:44 +00:00
|
|
|
|
|
|
|
|
= help: first argument of the attribute should be the diagnostic slug
|
2020-08-27 10:00:21 +00:00
|
|
|
|
2022-06-23 13:51:44 +00:00
|
|
|
error: diagnostic slug not specified
|
2022-06-29 08:21:44 +00:00
|
|
|
--> $DIR/diagnostic-derive.rs:83:1
|
2020-08-27 10:00:21 +00:00
|
|
|
|
|
2022-08-19 13:40:48 +00:00
|
|
|
LL | / #[diag(nonsense = 4, code = "E0123", slug = "foo")]
|
2022-06-23 13:51:44 +00:00
|
|
|
LL | |
|
|
|
|
LL | |
|
|
|
|
LL | | struct InvalidNestedStructAttr3 {}
|
|
|
|
| |__________________________________^
|
2022-04-27 03:06:13 +00:00
|
|
|
|
|
2022-08-19 13:02:10 +00:00
|
|
|
= help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(typeck::example_error)]`
|
2020-08-27 10:00:21 +00:00
|
|
|
|
2022-08-19 13:40:48 +00:00
|
|
|
error: `#[diag(slug = ...)]` is not a valid attribute
|
|
|
|
--> $DIR/diagnostic-derive.rs:89:58
|
2022-03-31 07:35:17 +00:00
|
|
|
|
|
2022-08-19 13:40:48 +00:00
|
|
|
LL | #[diag(typeck::ambiguous_lifetime_bound, code = "E0123", slug = "foo")]
|
|
|
|
| ^^^^^^^^^^^^
|
2022-03-31 07:35:17 +00:00
|
|
|
|
|
2022-06-23 13:51:44 +00:00
|
|
|
= help: only `code` is a valid nested attributes following the slug
|
|
|
|
|
|
|
|
error: `#[suggestion = ...]` is not a valid attribute
|
2022-06-29 08:21:44 +00:00
|
|
|
--> $DIR/diagnostic-derive.rs:96:5
|
2020-08-27 10:00:21 +00:00
|
|
|
|
|
2022-06-23 13:51:44 +00:00
|
|
|
LL | #[suggestion = "bar"]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^
|
2020-08-27 10:00:21 +00:00
|
|
|
|
2022-04-27 03:28:21 +00:00
|
|
|
error: specified multiple times
|
2022-06-29 08:21:44 +00:00
|
|
|
--> $DIR/diagnostic-derive.rs:103:1
|
2022-04-27 03:28:21 +00:00
|
|
|
|
|
2022-08-19 13:40:48 +00:00
|
|
|
LL | #[diag(typeck::ambiguous_lifetime_bound, code = "E0456")]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2022-04-27 03:28:21 +00:00
|
|
|
|
|
|
|
|
note: previously specified here
|
2022-06-29 08:21:44 +00:00
|
|
|
--> $DIR/diagnostic-derive.rs:102:1
|
2022-04-27 03:28:21 +00:00
|
|
|
|
|
2022-08-19 13:40:48 +00:00
|
|
|
LL | #[diag(typeck::ambiguous_lifetime_bound, code = "E0123")]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2022-04-27 03:28:21 +00:00
|
|
|
|
|
|
|
error: specified multiple times
|
2022-08-19 13:40:48 +00:00
|
|
|
--> $DIR/diagnostic-derive.rs:103:49
|
2022-03-31 07:35:17 +00:00
|
|
|
|
|
2022-08-19 13:40:48 +00:00
|
|
|
LL | #[diag(typeck::ambiguous_lifetime_bound, code = "E0456")]
|
|
|
|
| ^^^^^^^
|
2022-03-31 07:35:17 +00:00
|
|
|
|
|
|
|
|
note: previously specified here
|
2022-08-19 13:40:48 +00:00
|
|
|
--> $DIR/diagnostic-derive.rs:102:49
|
2022-03-31 07:35:17 +00:00
|
|
|
|
|
2022-08-19 13:40:48 +00:00
|
|
|
LL | #[diag(typeck::ambiguous_lifetime_bound, code = "E0123")]
|
|
|
|
| ^^^^^^^
|
2022-03-31 07:35:17 +00:00
|
|
|
|
2022-04-27 03:28:21 +00:00
|
|
|
error: specified multiple times
|
2022-08-19 13:40:48 +00:00
|
|
|
--> $DIR/diagnostic-derive.rs:109:65
|
2022-03-31 07:35:17 +00:00
|
|
|
|
|
2022-08-19 13:40:48 +00:00
|
|
|
LL | #[diag(typeck::ambiguous_lifetime_bound, code = "E0456", code = "E0457")]
|
|
|
|
| ^^^^^^^
|
2022-03-31 07:35:17 +00:00
|
|
|
|
|
|
|
|
note: previously specified here
|
2022-08-19 13:40:48 +00:00
|
|
|
--> $DIR/diagnostic-derive.rs:109:49
|
2022-03-31 07:35:17 +00:00
|
|
|
|
|
2022-08-19 13:40:48 +00:00
|
|
|
LL | #[diag(typeck::ambiguous_lifetime_bound, code = "E0456", code = "E0457")]
|
|
|
|
| ^^^^^^^
|
2022-06-23 13:51:44 +00:00
|
|
|
|
2022-08-19 13:40:48 +00:00
|
|
|
error: `#[diag(typeck::ambiguous_lifetime_bound)]` is not a valid attribute
|
|
|
|
--> $DIR/diagnostic-derive.rs:114:42
|
2022-06-23 13:51:44 +00:00
|
|
|
|
|
2022-08-19 13:40:48 +00:00
|
|
|
LL | #[diag(typeck::ambiguous_lifetime_bound, typeck::ambiguous_lifetime_bound, code = "E0456")]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2022-03-31 07:35:17 +00:00
|
|
|
|
2022-08-19 13:02:10 +00:00
|
|
|
error: diagnostic slug not specified
|
2022-08-19 13:40:48 +00:00
|
|
|
--> $DIR/diagnostic-derive.rs:119:1
|
2022-03-31 07:35:17 +00:00
|
|
|
|
|
|
|
|
LL | struct KindNotProvided {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
2022-08-19 13:02:10 +00:00
|
|
|
= help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(typeck::example_error)]`
|
2022-03-31 07:35:17 +00:00
|
|
|
|
2022-06-23 13:51:44 +00:00
|
|
|
error: diagnostic slug not specified
|
2022-08-19 13:40:48 +00:00
|
|
|
--> $DIR/diagnostic-derive.rs:122:1
|
2022-03-31 07:35:17 +00:00
|
|
|
|
|
2022-08-19 13:40:48 +00:00
|
|
|
LL | / #[diag(code = "E0456")]
|
2022-06-23 13:51:44 +00:00
|
|
|
LL | |
|
2022-03-31 07:35:17 +00:00
|
|
|
LL | | struct SlugNotProvided {}
|
|
|
|
| |_________________________^
|
|
|
|
|
|
2022-08-19 13:02:10 +00:00
|
|
|
= help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(typeck::example_error)]`
|
2020-08-27 10:00:21 +00:00
|
|
|
|
2022-07-11 16:15:31 +00:00
|
|
|
error: the `#[primary_span]` attribute can only be applied to fields of type `Span` or `MultiSpan`
|
2022-08-19 13:40:48 +00:00
|
|
|
--> $DIR/diagnostic-derive.rs:133:5
|
2022-03-31 07:35:17 +00:00
|
|
|
|
|
2022-03-31 07:50:45 +00:00
|
|
|
LL | #[primary_span]
|
|
|
|
| ^^^^^^^^^^^^^^^
|
2022-03-31 07:35:17 +00:00
|
|
|
|
2022-04-27 03:06:13 +00:00
|
|
|
error: `#[nonsense]` is not a valid attribute
|
2022-08-19 13:40:48 +00:00
|
|
|
--> $DIR/diagnostic-derive.rs:141:5
|
2020-08-27 10:00:21 +00:00
|
|
|
|
|
2022-03-31 07:35:17 +00:00
|
|
|
LL | #[nonsense]
|
|
|
|
| ^^^^^^^^^^^
|
2022-04-27 03:06:13 +00:00
|
|
|
|
|
2022-04-27 04:59:48 +00:00
|
|
|
= help: only `skip_arg`, `primary_span`, `label`, `note`, `help` and `subdiagnostic` are valid field attributes
|
2020-08-27 10:00:21 +00:00
|
|
|
|
2022-07-11 16:15:31 +00:00
|
|
|
error: the `#[label(...)]` attribute can only be applied to fields of type `Span` or `MultiSpan`
|
2022-08-19 13:40:48 +00:00
|
|
|
--> $DIR/diagnostic-derive.rs:158:5
|
2020-08-27 10:00:21 +00:00
|
|
|
|
|
2022-06-23 13:51:44 +00:00
|
|
|
LL | #[label(typeck::label)]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^
|
2020-08-27 10:00:21 +00:00
|
|
|
|
|
|
|
error: `name` doesn't refer to a field on this type
|
2022-08-19 13:40:48 +00:00
|
|
|
--> $DIR/diagnostic-derive.rs:166:45
|
2020-08-27 10:00:21 +00:00
|
|
|
|
|
2022-06-23 13:51:44 +00:00
|
|
|
LL | #[suggestion(typeck::suggestion, code = "{name}")]
|
|
|
|
| ^^^^^^^^
|
2020-08-27 10:00:21 +00:00
|
|
|
|
|
|
|
error: invalid format string: expected `'}'` but string was terminated
|
2022-08-19 13:40:48 +00:00
|
|
|
--> $DIR/diagnostic-derive.rs:171:16
|
2020-08-27 10:00:21 +00:00
|
|
|
|
|
2022-09-18 15:46:56 +00:00
|
|
|
LL | #[derive(Diagnostic)]
|
2022-03-31 09:24:46 +00:00
|
|
|
| - ^ expected `'}'` in format string
|
|
|
|
| |
|
|
|
|
| because of this opening brace
|
2020-08-27 10:00:21 +00:00
|
|
|
|
|
|
|
|
= note: if you intended to print `{`, you can escape it using `{{`
|
2022-09-18 15:46:56 +00:00
|
|
|
= note: this error originates in the derive macro `Diagnostic` (in Nightly builds, run with -Z macro-backtrace for more info)
|
2020-08-27 10:00:21 +00:00
|
|
|
|
|
|
|
error: invalid format string: unmatched `}` found
|
2022-08-19 13:40:48 +00:00
|
|
|
--> $DIR/diagnostic-derive.rs:181:15
|
2020-08-27 10:00:21 +00:00
|
|
|
|
|
2022-09-18 15:46:56 +00:00
|
|
|
LL | #[derive(Diagnostic)]
|
2022-03-31 09:24:46 +00:00
|
|
|
| ^ unmatched `}` in format string
|
2020-08-27 10:00:21 +00:00
|
|
|
|
|
|
|
|
= note: if you intended to print `}`, you can escape it using `}}`
|
2022-09-18 15:46:56 +00:00
|
|
|
= note: this error originates in the derive macro `Diagnostic` (in Nightly builds, run with -Z macro-backtrace for more info)
|
2020-08-27 10:00:21 +00:00
|
|
|
|
2022-07-11 16:15:31 +00:00
|
|
|
error: the `#[label(...)]` attribute can only be applied to fields of type `Span` or `MultiSpan`
|
2022-08-19 13:40:48 +00:00
|
|
|
--> $DIR/diagnostic-derive.rs:201:5
|
2020-08-27 10:00:21 +00:00
|
|
|
|
|
2022-06-23 13:51:44 +00:00
|
|
|
LL | #[label(typeck::label)]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^
|
2020-08-27 10:00:21 +00:00
|
|
|
|
2022-04-27 03:06:13 +00:00
|
|
|
error: `#[suggestion(nonsense = ...)]` is not a valid attribute
|
2022-08-19 13:40:48 +00:00
|
|
|
--> $DIR/diagnostic-derive.rs:226:18
|
2020-08-27 10:00:21 +00:00
|
|
|
|
|
2022-03-31 12:10:13 +00:00
|
|
|
LL | #[suggestion(nonsense = "bar")]
|
|
|
|
| ^^^^^^^^^^^^^^^^
|
2022-04-27 03:06:13 +00:00
|
|
|
|
|
2022-04-27 04:43:36 +00:00
|
|
|
= help: only `message`, `code` and `applicability` are valid field attributes
|
2020-08-27 10:00:21 +00:00
|
|
|
|
2022-04-27 03:06:13 +00:00
|
|
|
error: `#[suggestion(msg = ...)]` is not a valid attribute
|
2022-08-19 13:40:48 +00:00
|
|
|
--> $DIR/diagnostic-derive.rs:234:18
|
2020-08-27 10:00:21 +00:00
|
|
|
|
|
2022-03-31 12:10:13 +00:00
|
|
|
LL | #[suggestion(msg = "bar")]
|
|
|
|
| ^^^^^^^^^^^
|
2022-04-27 03:06:13 +00:00
|
|
|
|
|
2022-04-27 04:43:36 +00:00
|
|
|
= help: only `message`, `code` and `applicability` are valid field attributes
|
2020-08-27 10:00:21 +00:00
|
|
|
|
|
|
|
error: wrong field type for suggestion
|
2022-08-19 13:40:48 +00:00
|
|
|
--> $DIR/diagnostic-derive.rs:256:5
|
2020-08-27 10:00:21 +00:00
|
|
|
|
|
2022-06-23 13:51:44 +00:00
|
|
|
LL | / #[suggestion(typeck::suggestion, code = "This is suggested code")]
|
2020-11-18 10:18:40 +00:00
|
|
|
LL | |
|
|
|
|
LL | | suggestion: Applicability,
|
|
|
|
| |_____________________________^
|
2020-08-27 10:00:21 +00:00
|
|
|
|
|
2022-03-30 09:04:03 +00:00
|
|
|
= help: `#[suggestion(...)]` should be applied to fields of type `Span` or `(Span, Applicability)`
|
2020-08-27 10:00:21 +00:00
|
|
|
|
2022-03-30 09:04:03 +00:00
|
|
|
error: type of field annotated with `#[suggestion(...)]` contains more than one `Span`
|
2022-08-19 13:40:48 +00:00
|
|
|
--> $DIR/diagnostic-derive.rs:271:5
|
2020-08-27 10:00:21 +00:00
|
|
|
|
|
2022-06-23 13:51:44 +00:00
|
|
|
LL | / #[suggestion(typeck::suggestion, code = "This is suggested code")]
|
2020-11-18 10:18:40 +00:00
|
|
|
LL | |
|
|
|
|
LL | | suggestion: (Span, Span, Applicability),
|
|
|
|
| |___________________________________________^
|
2020-08-27 10:00:21 +00:00
|
|
|
|
|
|
|
error: type of field annotated with `#[suggestion(...)]` contains more than one Applicability
|
2022-08-19 13:40:48 +00:00
|
|
|
--> $DIR/diagnostic-derive.rs:279:5
|
2020-08-27 10:00:21 +00:00
|
|
|
|
|
2022-06-23 13:51:44 +00:00
|
|
|
LL | / #[suggestion(typeck::suggestion, code = "This is suggested code")]
|
2020-11-18 10:18:40 +00:00
|
|
|
LL | |
|
|
|
|
LL | | suggestion: (Applicability, Applicability, Span),
|
|
|
|
| |____________________________________________________^
|
2020-08-27 10:00:21 +00:00
|
|
|
|
2022-06-23 13:51:44 +00:00
|
|
|
error: `#[label = ...]` is not a valid attribute
|
2022-08-19 13:40:48 +00:00
|
|
|
--> $DIR/diagnostic-derive.rs:287:5
|
2022-04-27 03:06:13 +00:00
|
|
|
|
|
2022-06-23 13:51:44 +00:00
|
|
|
LL | #[label = "bar"]
|
|
|
|
| ^^^^^^^^^^^^^^^^
|
2020-08-27 10:00:21 +00:00
|
|
|
|
2022-04-27 04:43:36 +00:00
|
|
|
error: applicability cannot be set in both the field and attribute
|
2022-08-19 13:40:48 +00:00
|
|
|
--> $DIR/diagnostic-derive.rs:438:52
|
2022-04-27 04:43:36 +00:00
|
|
|
|
|
2022-06-23 13:51:44 +00:00
|
|
|
LL | #[suggestion(typeck::suggestion, code = "...", applicability = "maybe-incorrect")]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2022-04-27 04:43:36 +00:00
|
|
|
|
|
|
|
error: invalid applicability
|
2022-08-19 13:40:48 +00:00
|
|
|
--> $DIR/diagnostic-derive.rs:446:52
|
2022-06-23 13:51:44 +00:00
|
|
|
|
|
|
|
|
LL | #[suggestion(typeck::suggestion, code = "...", applicability = "batman")]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: `#[label(...)]` is not a valid attribute
|
2022-08-19 13:40:48 +00:00
|
|
|
--> $DIR/diagnostic-derive.rs:509:5
|
2022-06-23 13:51:44 +00:00
|
|
|
|
|
|
|
|
LL | #[label(typeck::label, foo)]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: `#[label(...)]` is not a valid attribute
|
2022-08-19 13:40:48 +00:00
|
|
|
--> $DIR/diagnostic-derive.rs:517:5
|
2022-06-23 13:51:44 +00:00
|
|
|
|
|
|
|
|
LL | #[label(typeck::label, foo = "...")]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: `#[label(...)]` is not a valid attribute
|
2022-08-19 13:40:48 +00:00
|
|
|
--> $DIR/diagnostic-derive.rs:525:5
|
2022-04-27 04:43:36 +00:00
|
|
|
|
|
2022-06-23 13:51:44 +00:00
|
|
|
LL | #[label(typeck::label, foo("..."))]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2022-04-27 04:43:36 +00:00
|
|
|
|
2022-08-19 13:40:48 +00:00
|
|
|
error: `#[primary_span]` is not a valid attribute
|
|
|
|
--> $DIR/diagnostic-derive.rs:538:5
|
2022-06-30 07:57:45 +00:00
|
|
|
|
|
2022-08-19 13:40:48 +00:00
|
|
|
LL | #[primary_span]
|
|
|
|
| ^^^^^^^^^^^^^^^
|
2022-06-30 07:57:45 +00:00
|
|
|
|
|
2022-08-19 13:40:48 +00:00
|
|
|
= help: the `primary_span` field attribute is not valid for lint diagnostics
|
2022-06-30 07:57:45 +00:00
|
|
|
|
2022-08-19 13:40:48 +00:00
|
|
|
error: `#[error(...)]` is not a valid attribute
|
|
|
|
--> $DIR/diagnostic-derive.rs:558:1
|
2022-06-30 07:57:45 +00:00
|
|
|
|
|
2022-08-19 13:40:48 +00:00
|
|
|
LL | #[error(typeck::ambiguous_lifetime_bound, code = "E0123")]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2022-06-30 07:57:45 +00:00
|
|
|
|
|
2022-08-24 15:57:10 +00:00
|
|
|
= help: `error` and `lint` have been replaced by `diag`
|
2022-06-30 07:57:45 +00:00
|
|
|
|
2022-08-19 13:40:48 +00:00
|
|
|
error: diagnostic slug not specified
|
|
|
|
--> $DIR/diagnostic-derive.rs:558:1
|
2022-08-19 13:04:34 +00:00
|
|
|
|
|
2022-08-19 13:40:48 +00:00
|
|
|
LL | / #[error(typeck::ambiguous_lifetime_bound, code = "E0123")]
|
|
|
|
LL | |
|
|
|
|
LL | |
|
|
|
|
LL | |
|
|
|
|
LL | | struct ErrorAttribute {}
|
|
|
|
| |________________________^
|
2022-08-19 13:04:34 +00:00
|
|
|
|
|
2022-08-19 13:40:48 +00:00
|
|
|
= help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(typeck::example_error)]`
|
|
|
|
|
2022-08-24 15:57:10 +00:00
|
|
|
error: `#[warn_(...)]` is not a valid attribute
|
2022-08-19 13:40:48 +00:00
|
|
|
--> $DIR/diagnostic-derive.rs:565:1
|
|
|
|
|
|
2022-08-24 15:57:10 +00:00
|
|
|
LL | #[warn_(typeck::ambiguous_lifetime_bound, code = "E0123")]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2022-08-19 13:40:48 +00:00
|
|
|
|
|
2022-08-24 15:57:10 +00:00
|
|
|
= help: `warn_` have been replaced by `warning`
|
2022-08-19 13:40:48 +00:00
|
|
|
|
|
|
|
error: diagnostic slug not specified
|
|
|
|
--> $DIR/diagnostic-derive.rs:565:1
|
|
|
|
|
|
2022-08-24 15:57:10 +00:00
|
|
|
LL | / #[warn_(typeck::ambiguous_lifetime_bound, code = "E0123")]
|
2022-08-19 13:40:48 +00:00
|
|
|
LL | |
|
|
|
|
LL | |
|
|
|
|
LL | |
|
2022-08-24 15:57:10 +00:00
|
|
|
LL | | struct WarnAttribute {}
|
|
|
|
| |_______________________^
|
2022-08-19 13:40:48 +00:00
|
|
|
|
|
|
|
|
= help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(typeck::example_error)]`
|
|
|
|
|
|
|
|
error: `#[lint(...)]` is not a valid attribute
|
|
|
|
--> $DIR/diagnostic-derive.rs:572:1
|
|
|
|
|
|
|
|
|
LL | #[lint(typeck::ambiguous_lifetime_bound, code = "E0123")]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
2022-08-24 15:57:10 +00:00
|
|
|
= help: `error` and `lint` have been replaced by `diag`
|
2022-08-19 13:40:48 +00:00
|
|
|
|
|
|
|
error: diagnostic slug not specified
|
|
|
|
--> $DIR/diagnostic-derive.rs:572:1
|
|
|
|
|
|
|
|
|
LL | / #[lint(typeck::ambiguous_lifetime_bound, code = "E0123")]
|
|
|
|
LL | |
|
|
|
|
LL | |
|
|
|
|
LL | |
|
|
|
|
LL | | struct LintAttributeOnSessionDiag {}
|
|
|
|
| |____________________________________^
|
|
|
|
|
|
|
|
|
= help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(typeck::example_error)]`
|
|
|
|
|
|
|
|
error: `#[lint(...)]` is not a valid attribute
|
|
|
|
--> $DIR/diagnostic-derive.rs:579:1
|
|
|
|
|
|
|
|
|
LL | #[lint(typeck::ambiguous_lifetime_bound, code = "E0123")]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
2022-08-24 15:57:10 +00:00
|
|
|
= help: `error` and `lint` have been replaced by `diag`
|
2022-08-19 13:40:48 +00:00
|
|
|
|
|
|
|
error: diagnostic slug not specified
|
|
|
|
--> $DIR/diagnostic-derive.rs:579:1
|
|
|
|
|
|
|
|
|
LL | / #[lint(typeck::ambiguous_lifetime_bound, code = "E0123")]
|
|
|
|
LL | |
|
|
|
|
LL | |
|
|
|
|
LL | |
|
|
|
|
LL | | struct LintAttributeOnLintDiag {}
|
|
|
|
| |_________________________________^
|
|
|
|
|
|
|
|
|
= help: specify the slug as the first argument to the attribute, such as `#[diag(typeck::example_error)]`
|
2022-08-19 13:04:34 +00:00
|
|
|
|
2022-09-10 12:28:12 +00:00
|
|
|
error: specified multiple times
|
|
|
|
--> $DIR/diagnostic-derive.rs:588:52
|
|
|
|
|
|
|
|
|
LL | #[suggestion(typeck::suggestion, code = "...", code = ",,,")]
|
|
|
|
| ^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
note: previously specified here
|
|
|
|
--> $DIR/diagnostic-derive.rs:588:38
|
|
|
|
|
|
|
|
|
LL | #[suggestion(typeck::suggestion, code = "...", code = ",,,")]
|
|
|
|
| ^^^^^^^^^^^^
|
|
|
|
|
2022-03-31 07:35:17 +00:00
|
|
|
error: cannot find attribute `nonsense` in this scope
|
2022-06-29 08:21:44 +00:00
|
|
|
--> $DIR/diagnostic-derive.rs:53:3
|
2022-03-31 07:35:17 +00:00
|
|
|
|
|
2022-06-23 13:51:44 +00:00
|
|
|
LL | #[nonsense(typeck::ambiguous_lifetime_bound, code = "E0123")]
|
2022-03-31 07:35:17 +00:00
|
|
|
| ^^^^^^^^
|
|
|
|
|
|
|
|
error: cannot find attribute `nonsense` in this scope
|
2022-08-19 13:40:48 +00:00
|
|
|
--> $DIR/diagnostic-derive.rs:141:7
|
2022-03-31 07:35:17 +00:00
|
|
|
|
|
|
|
|
LL | #[nonsense]
|
|
|
|
| ^^^^^^^^
|
|
|
|
|
2022-08-19 13:40:48 +00:00
|
|
|
error: cannot find attribute `error` in this scope
|
|
|
|
--> $DIR/diagnostic-derive.rs:558:3
|
|
|
|
|
|
|
|
|
LL | #[error(typeck::ambiguous_lifetime_bound, code = "E0123")]
|
|
|
|
| ^^^^^
|
|
|
|
|
2022-08-24 15:57:10 +00:00
|
|
|
error: cannot find attribute `warn_` in this scope
|
2022-08-19 13:40:48 +00:00
|
|
|
--> $DIR/diagnostic-derive.rs:565:3
|
|
|
|
|
|
2022-08-24 15:57:10 +00:00
|
|
|
LL | #[warn_(typeck::ambiguous_lifetime_bound, code = "E0123")]
|
|
|
|
| ^^^^^ help: a built-in attribute with a similar name exists: `warn`
|
2022-08-19 13:40:48 +00:00
|
|
|
|
|
|
|
error: cannot find attribute `lint` in this scope
|
|
|
|
--> $DIR/diagnostic-derive.rs:572:3
|
|
|
|
|
|
|
|
|
LL | #[lint(typeck::ambiguous_lifetime_bound, code = "E0123")]
|
|
|
|
| ^^^^ help: a built-in attribute with a similar name exists: `link`
|
|
|
|
|
|
|
|
error: cannot find attribute `lint` in this scope
|
|
|
|
--> $DIR/diagnostic-derive.rs:579:3
|
|
|
|
|
|
|
|
|
LL | #[lint(typeck::ambiguous_lifetime_bound, code = "E0123")]
|
|
|
|
| ^^^^ help: a built-in attribute with a similar name exists: `link`
|
|
|
|
|
2022-06-23 13:51:44 +00:00
|
|
|
error[E0425]: cannot find value `nonsense` in module `rustc_errors::fluent`
|
2022-08-19 13:40:48 +00:00
|
|
|
--> $DIR/diagnostic-derive.rs:66:8
|
2022-06-23 13:51:44 +00:00
|
|
|
|
|
2022-08-19 13:40:48 +00:00
|
|
|
LL | #[diag(nonsense, code = "E0123")]
|
|
|
|
| ^^^^^^^^ not found in `rustc_errors::fluent`
|
2022-06-23 13:51:44 +00:00
|
|
|
|
2022-05-07 06:26:03 +00:00
|
|
|
error[E0277]: the trait bound `Hello: IntoDiagnosticArg` is not satisfied
|
2022-08-19 13:40:48 +00:00
|
|
|
--> $DIR/diagnostic-derive.rs:331:10
|
2022-03-31 08:02:31 +00:00
|
|
|
|
|
2022-09-18 15:46:56 +00:00
|
|
|
LL | #[derive(Diagnostic)]
|
2022-09-15 04:01:44 +00:00
|
|
|
| ^^^^^^^^^^ the trait `IntoDiagnosticArg` is not implemented for `Hello`
|
2022-05-07 06:26:03 +00:00
|
|
|
|
|
2022-06-29 08:21:44 +00:00
|
|
|
= help: normalized in stderr
|
2022-05-07 06:26:03 +00:00
|
|
|
note: required by a bound in `DiagnosticBuilder::<'a, G>::set_arg`
|
2022-08-31 14:46:51 +00:00
|
|
|
--> $COMPILER_DIR/rustc_errors/src/diagnostic_builder.rs:LL:CC
|
2022-05-07 06:26:03 +00:00
|
|
|
|
|
|
|
|
LL | arg: impl IntoDiagnosticArg,
|
|
|
|
| ^^^^^^^^^^^^^^^^^ required by this bound in `DiagnosticBuilder::<'a, G>::set_arg`
|
2022-09-18 15:46:56 +00:00
|
|
|
= note: this error originates in the derive macro `Diagnostic` (in Nightly builds, run with -Z macro-backtrace for more info)
|
2022-03-31 08:02:31 +00:00
|
|
|
|
2022-09-10 12:28:12 +00:00
|
|
|
error: aborting due to 56 previous errors
|
2020-08-27 10:00:21 +00:00
|
|
|
|
2022-06-23 13:51:44 +00:00
|
|
|
Some errors have detailed explanations: E0277, E0425.
|
|
|
|
For more information about an error, try `rustc --explain E0277`.
|