2022-09-23 11:49:02 +00:00
error: unsupported type attribute for diagnostic derive enum
2022-10-13 09:13:02 +00:00
--> $DIR/diagnostic-derive.rs:41:1
2020-08-27 10:00:21 +00:00
|
2022-10-13 09:13:02 +00:00
LL | #[diag(no_crate_example, code = "E0123")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2022-09-23 11:49:02 +00:00
error: diagnostic slug not specified
2022-10-13 09:13:02 +00:00
--> $DIR/diagnostic-derive.rs:44:5
2022-09-23 11:49:02 +00:00
|
LL | Foo,
| ^^^
|
2022-10-22 09:08:09 +00:00
= help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]`
2022-09-23 11:49:02 +00:00
error: diagnostic slug not specified
2022-10-13 09:13:02 +00:00
--> $DIR/diagnostic-derive.rs:46:5
2022-09-23 11:49:02 +00:00
|
LL | Bar,
| ^^^
|
2022-10-22 09:08:09 +00:00
= help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]`
2020-08-27 10:00:21 +00:00
2023-04-03 14:36:50 +00:00
error: expected parentheses: #[diag(...)]
--> $DIR/diagnostic-derive.rs:52:8
2020-08-27 10:00:21 +00:00
|
2022-08-19 13:40:48 +00:00
LL | #[diag = "E0123"]
2023-04-03 14:36:50 +00:00
| ^
2022-03-31 07:35:17 +00:00
2022-04-27 03:06:13 +00:00
error: `#[nonsense(...)]` is not a valid attribute
2022-10-13 09:13:02 +00:00
--> $DIR/diagnostic-derive.rs:57:1
2022-03-31 07:35:17 +00:00
|
2022-10-13 09:13:02 +00:00
LL | #[nonsense(no_crate_example, code = "E0123")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2022-03-31 07:35:17 +00:00
2022-08-19 13:02:10 +00:00
error: diagnostic slug not specified
2022-10-13 09:13:02 +00:00
--> $DIR/diagnostic-derive.rs:57:1
2022-03-31 07:35:17 +00:00
|
2022-10-13 09:13:02 +00:00
LL | / #[nonsense(no_crate_example, code = "E0123")]
2022-03-31 07:35:17 +00:00
LL | |
LL | |
LL | |
LL | | struct InvalidStructAttr {}
| |___________________________^
|
2022-10-22 09:08:09 +00:00
= help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]`
2022-03-31 07:35:17 +00:00
2022-06-23 13:51:44 +00:00
error: diagnostic slug not specified
2022-10-13 09:13:02 +00:00
--> $DIR/diagnostic-derive.rs:64: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 | | struct InvalidLitNestedAttr {}
| |______________________________^
|
2022-10-22 09:08:09 +00:00
= help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]`
2022-03-31 07:35:17 +00:00
2023-04-03 14:36:50 +00:00
error: diagnostic slug must be the first argument
--> $DIR/diagnostic-derive.rs:74:16
2022-03-31 07:35:17 +00:00
|
2022-08-19 13:40:48 +00:00
LL | #[diag(nonsense("foo"), code = "E0123", slug = "foo")]
2023-04-03 14:36:50 +00:00
| ^
2022-06-23 13:51:44 +00:00
error: diagnostic slug not specified
2023-04-03 14:36:50 +00:00
--> $DIR/diagnostic-derive.rs:74: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-10-22 09:08:09 +00:00
= help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]`
2022-03-31 07:35:17 +00:00
2023-04-03 14:36:50 +00:00
error: unknown argument
--> $DIR/diagnostic-derive.rs:80:8
2022-09-14 15:19:40 +00:00
|
LL | #[diag(nonsense = "...", code = "E0123", slug = "foo")]
2023-04-03 14:36:50 +00:00
| ^^^^^^^^
2022-09-14 15:19:40 +00:00
|
2023-04-03 14:36:50 +00:00
= note: only the `code` parameter is valid after the slug
2022-06-23 13:51:44 +00:00
error: diagnostic slug not specified
2023-04-03 14:36:50 +00:00
--> $DIR/diagnostic-derive.rs:80: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-10-22 09:08:09 +00:00
= help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]`
2022-03-31 07:35:17 +00:00
2023-04-03 14:36:50 +00:00
error: unknown argument
--> $DIR/diagnostic-derive.rs:86:8
2022-06-23 13:51:44 +00:00
|
2022-09-14 15:19:40 +00:00
LL | #[diag(nonsense = 4, code = "E0123", slug = "foo")]
2023-04-03 14:36:50 +00:00
| ^^^^^^^^
2022-09-14 15:19:40 +00:00
|
2023-04-03 14:36:50 +00:00
= note: only the `code` parameter is valid after the slug
2020-08-27 10:00:21 +00:00
2022-06-23 13:51:44 +00:00
error: diagnostic slug not specified
2023-04-03 14:36:50 +00:00
--> $DIR/diagnostic-derive.rs:86: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-10-22 09:08:09 +00:00
= help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]`
2020-08-27 10:00:21 +00:00
2023-04-03 14:36:50 +00:00
error: unknown argument
--> $DIR/diagnostic-derive.rs:92:42
2022-03-31 07:35:17 +00:00
|
2022-10-13 09:13:02 +00:00
LL | #[diag(no_crate_example, code = "E0123", slug = "foo")]
2023-04-03 14:36:50 +00:00
| ^^^^
2022-03-31 07:35:17 +00:00
|
2023-04-03 14:36:50 +00:00
= note: only the `code` parameter is valid after the slug
2022-06-23 13:51:44 +00:00
error: `#[suggestion = ...]` is not a valid attribute
2023-04-03 14:36:50 +00:00
--> $DIR/diagnostic-derive.rs:99: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
2023-04-03 14:36:50 +00:00
--> $DIR/diagnostic-derive.rs:106:8
2022-04-27 03:28:21 +00:00
|
2022-10-13 09:13:02 +00:00
LL | #[diag(no_crate_example, code = "E0456")]
| ^^^^^^^^^^^^^^^^
2022-04-27 03:28:21 +00:00
|
note: previously specified here
2023-04-03 14:36:50 +00:00
--> $DIR/diagnostic-derive.rs:105:8
2022-04-27 03:28:21 +00:00
|
2022-10-13 09:13:02 +00:00
LL | #[diag(no_crate_example, code = "E0123")]
| ^^^^^^^^^^^^^^^^
2022-04-27 03:28:21 +00:00
error: specified multiple times
2023-04-03 14:36:50 +00:00
--> $DIR/diagnostic-derive.rs:106:26
2022-03-31 07:35:17 +00:00
|
2022-10-13 09:13:02 +00:00
LL | #[diag(no_crate_example, code = "E0456")]
2023-04-03 14:36:50 +00:00
| ^^^^
2022-03-31 07:35:17 +00:00
|
note: previously specified here
2023-04-03 14:36:50 +00:00
--> $DIR/diagnostic-derive.rs:105:26
2022-03-31 07:35:17 +00:00
|
2022-10-13 09:13:02 +00:00
LL | #[diag(no_crate_example, code = "E0123")]
2023-04-03 14:36:50 +00:00
| ^^^^
2022-03-31 07:35:17 +00:00
2022-04-27 03:28:21 +00:00
error: specified multiple times
2023-04-03 14:36:50 +00:00
--> $DIR/diagnostic-derive.rs:112:42
2022-03-31 07:35:17 +00:00
|
2022-10-13 09:13:02 +00:00
LL | #[diag(no_crate_example, code = "E0456", code = "E0457")]
2023-04-03 14:36:50 +00:00
| ^^^^
2022-03-31 07:35:17 +00:00
|
note: previously specified here
2023-04-03 14:36:50 +00:00
--> $DIR/diagnostic-derive.rs:112:26
2022-03-31 07:35:17 +00:00
|
2022-10-13 09:13:02 +00:00
LL | #[diag(no_crate_example, code = "E0456", code = "E0457")]
2023-04-03 14:36:50 +00:00
| ^^^^
2022-06-23 13:51:44 +00:00
2023-04-03 14:36:50 +00:00
error: diagnostic slug must be the first argument
--> $DIR/diagnostic-derive.rs:117:43
2022-06-23 13:51:44 +00:00
|
2022-10-13 09:13:02 +00:00
LL | #[diag(no_crate_example, no_crate::example, code = "E0456")]
2023-04-03 14:36:50 +00:00
| ^
2022-03-31 07:35:17 +00:00
2022-08-19 13:02:10 +00:00
error: diagnostic slug not specified
2023-04-03 14:36:50 +00:00
--> $DIR/diagnostic-derive.rs:122:1
2022-03-31 07:35:17 +00:00
|
LL | struct KindNotProvided {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
2022-10-22 09:08:09 +00:00
= help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]`
2022-03-31 07:35:17 +00:00
2022-06-23 13:51:44 +00:00
error: diagnostic slug not specified
2023-04-03 14:36:50 +00:00
--> $DIR/diagnostic-derive.rs:125: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-10-22 09:08:09 +00:00
= help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_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`
2023-04-03 14:36:50 +00:00
--> $DIR/diagnostic-derive.rs:136: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
2023-04-03 14:36:50 +00:00
--> $DIR/diagnostic-derive.rs:144:5
2020-08-27 10:00:21 +00:00
|
2022-03-31 07:35:17 +00:00
LL | #[nonsense]
| ^^^^^^^^^^^
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`
2023-04-03 14:36:50 +00:00
--> $DIR/diagnostic-derive.rs:161:5
2020-08-27 10:00:21 +00:00
|
2022-10-13 09:13:02 +00:00
LL | #[label(no_crate_label)]
| ^^^^^^^^^^^^^^^^^^^^^^^^
2020-08-27 10:00:21 +00:00
error: `name` doesn't refer to a field on this type
2023-04-03 14:36:50 +00:00
--> $DIR/diagnostic-derive.rs:169:46
2020-08-27 10:00:21 +00:00
|
2022-10-13 09:13:02 +00:00
LL | #[suggestion(no_crate_suggestion, code = "{name}")]
| ^^^^^^^^
2020-08-27 10:00:21 +00:00
error: invalid format string: expected `'}'` but string was terminated
2023-04-03 14:36:50 +00:00
--> $DIR/diagnostic-derive.rs:174:10
2020-08-27 10:00:21 +00:00
|
2022-09-18 15:46:56 +00:00
LL | #[derive(Diagnostic)]
2022-08-26 16:52:08 +00:00
| ^^^^^^^^^^ expected `'}'` 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
error: invalid format string: unmatched `}` found
2023-04-03 14:36:50 +00:00
--> $DIR/diagnostic-derive.rs:184:10
2020-08-27 10:00:21 +00:00
|
2022-09-18 15:46:56 +00:00
LL | #[derive(Diagnostic)]
2022-08-26 16:52:08 +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`
2023-04-03 14:36:50 +00:00
--> $DIR/diagnostic-derive.rs:204:5
2020-08-27 10:00:21 +00:00
|
2022-10-13 09:13:02 +00:00
LL | #[label(no_crate_label)]
| ^^^^^^^^^^^^^^^^^^^^^^^^
2020-08-27 10:00:21 +00:00
2022-09-14 15:19:40 +00:00
error: suggestion without `code = "..."`
2023-04-03 14:36:50 +00:00
--> $DIR/diagnostic-derive.rs:223:5
2022-09-14 15:19:40 +00:00
|
2022-10-13 09:13:02 +00:00
LL | #[suggestion(no_crate_suggestion)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2022-09-14 15:19:40 +00:00
2023-04-03 14:36:50 +00:00
error: invalid nested attribute
--> $DIR/diagnostic-derive.rs:231:18
2020-08-27 10:00:21 +00:00
|
2022-03-31 12:10:13 +00:00
LL | #[suggestion(nonsense = "bar")]
2023-04-03 14:36:50 +00:00
| ^^^^^^^^
2022-04-27 03:06:13 +00:00
|
2022-10-20 18:28:24 +00:00
= help: only `style`, `code` and `applicability` are valid nested attributes
2022-09-14 15:19:40 +00:00
error: suggestion without `code = "..."`
2023-04-03 14:36:50 +00:00
--> $DIR/diagnostic-derive.rs:231:5
2022-09-14 15:19:40 +00:00
|
LL | #[suggestion(nonsense = "bar")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2020-08-27 10:00:21 +00:00
2023-04-03 14:36:50 +00:00
error: invalid nested attribute
--> $DIR/diagnostic-derive.rs:240:18
2020-08-27 10:00:21 +00:00
|
2022-03-31 12:10:13 +00:00
LL | #[suggestion(msg = "bar")]
2023-04-03 14:36:50 +00:00
| ^^^
2022-04-27 03:06:13 +00:00
|
2022-10-20 18:28:24 +00:00
= help: only `style`, `code` and `applicability` are valid nested attributes
2022-09-14 15:19:40 +00:00
error: suggestion without `code = "..."`
2023-04-03 14:36:50 +00:00
--> $DIR/diagnostic-derive.rs:240:5
2022-09-14 15:19:40 +00:00
|
LL | #[suggestion(msg = "bar")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
2020-08-27 10:00:21 +00:00
error: wrong field type for suggestion
2023-04-03 14:36:50 +00:00
--> $DIR/diagnostic-derive.rs:263:5
2020-08-27 10:00:21 +00:00
|
2022-10-13 09:13:02 +00:00
LL | / #[suggestion(no_crate_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-09-10 12:43:07 +00:00
error: specified multiple times
2023-04-03 14:36:50 +00:00
--> $DIR/diagnostic-derive.rs:279:24
2020-08-27 10:00:21 +00:00
|
2022-09-10 12:43:07 +00:00
LL | suggestion: (Span, Span, Applicability),
| ^^^^
|
note: previously specified here
2023-04-03 14:36:50 +00:00
--> $DIR/diagnostic-derive.rs:279:18
2022-09-10 12:43:07 +00:00
|
LL | suggestion: (Span, Span, Applicability),
| ^^^^
2020-08-27 10:00:21 +00:00
2022-09-10 12:43:07 +00:00
error: specified multiple times
2023-04-03 14:36:50 +00:00
--> $DIR/diagnostic-derive.rs:287:33
2020-08-27 10:00:21 +00:00
|
2022-09-10 12:43:07 +00:00
LL | suggestion: (Applicability, Applicability, Span),
| ^^^^^^^^^^^^^
|
note: previously specified here
2023-04-03 14:36:50 +00:00
--> $DIR/diagnostic-derive.rs:287:18
2022-09-10 12:43:07 +00:00
|
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
2023-04-03 14:36:50 +00:00
--> $DIR/diagnostic-derive.rs:294: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-09-10 12:48:01 +00:00
error: specified multiple times
2023-04-03 14:36:50 +00:00
--> $DIR/diagnostic-derive.rs:445:5
2022-04-27 04:43:36 +00:00
|
2022-10-13 09:13:02 +00:00
LL | #[suggestion(no_crate_suggestion, code = "...", applicability = "maybe-incorrect")]
2023-04-03 14:36:50 +00:00
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2022-09-10 12:48:01 +00:00
|
note: previously specified here
2023-04-03 14:36:50 +00:00
--> $DIR/diagnostic-derive.rs:447:24
2022-09-10 12:48:01 +00:00
|
LL | suggestion: (Span, Applicability),
| ^^^^^^^^^^^^^
2022-04-27 04:43:36 +00:00
error: invalid applicability
2023-04-03 14:36:50 +00:00
--> $DIR/diagnostic-derive.rs:453:69
2022-06-23 13:51:44 +00:00
|
2022-10-13 09:13:02 +00:00
LL | #[suggestion(no_crate_suggestion, code = "...", applicability = "batman")]
2023-04-03 14:36:50 +00:00
| ^^^^^^^^
2022-06-23 13:51:44 +00:00
2023-02-27 12:54:11 +00:00
error: the `#[help(...)]` attribute can only be applied to fields of type `Span`, `bool` or `()`
2023-04-03 14:36:50 +00:00
--> $DIR/diagnostic-derive.rs:520:5
2023-02-27 12:54:11 +00:00
|
LL | #[help(no_crate_help)]
| ^^^^^^^^^^^^^^^^^^^^^^
2023-04-03 14:36:50 +00:00
error: a diagnostic slug must be the first argument to the attribute
--> $DIR/diagnostic-derive.rs:529:32
2022-06-23 13:51:44 +00:00
|
2022-10-13 09:13:02 +00:00
LL | #[label(no_crate_label, foo)]
2023-04-03 14:36:50 +00:00
| ^
2022-06-23 13:51:44 +00:00
2023-04-03 14:36:50 +00:00
error: invalid nested attribute
--> $DIR/diagnostic-derive.rs:537:29
2022-06-23 13:51:44 +00:00
|
2022-10-13 09:13:02 +00:00
LL | #[label(no_crate_label, foo = "...")]
2023-04-03 14:36:50 +00:00
| ^^^
2022-06-23 13:51:44 +00:00
2023-04-03 14:36:50 +00:00
error: invalid nested attribute
--> $DIR/diagnostic-derive.rs:545:29
2022-04-27 04:43:36 +00:00
|
2022-10-13 09:13:02 +00:00
LL | #[label(no_crate_label, foo("..."))]
2023-04-03 14:36:50 +00:00
| ^^^
2022-04-27 04:43:36 +00:00
2022-08-19 13:40:48 +00:00
error: `#[primary_span]` is not a valid attribute
2023-04-03 14:36:50 +00:00
--> $DIR/diagnostic-derive.rs:557: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
2023-04-03 14:36:50 +00:00
--> $DIR/diagnostic-derive.rs:577:1
2022-06-30 07:57:45 +00:00
|
2022-10-13 09:13:02 +00:00
LL | #[error(no_crate_example, code = "E0123")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2022-06-30 07:57:45 +00:00
2022-08-19 13:40:48 +00:00
error: diagnostic slug not specified
2023-04-03 14:36:50 +00:00
--> $DIR/diagnostic-derive.rs:577:1
2022-08-19 13:04:34 +00:00
|
2022-10-13 09:13:02 +00:00
LL | / #[error(no_crate_example, code = "E0123")]
2022-08-19 13:40:48 +00:00
LL | |
LL | |
LL | |
LL | | struct ErrorAttribute {}
| |________________________^
2022-08-19 13:04:34 +00:00
|
2022-10-22 09:08:09 +00:00
= help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]`
2022-08-19 13:40:48 +00:00
2022-08-24 15:57:10 +00:00
error: `#[warn_(...)]` is not a valid attribute
2023-04-03 14:36:50 +00:00
--> $DIR/diagnostic-derive.rs:584:1
2022-08-19 13:40:48 +00:00
|
2022-10-13 09:13:02 +00:00
LL | #[warn_(no_crate_example, code = "E0123")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2022-08-19 13:40:48 +00:00
error: diagnostic slug not specified
2023-04-03 14:36:50 +00:00
--> $DIR/diagnostic-derive.rs:584:1
2022-08-19 13:40:48 +00:00
|
2022-10-13 09:13:02 +00:00
LL | / #[warn_(no_crate_example, 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
|
2022-10-22 09:08:09 +00:00
= help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]`
2022-08-19 13:40:48 +00:00
error: `#[lint(...)]` is not a valid attribute
2023-04-03 14:36:50 +00:00
--> $DIR/diagnostic-derive.rs:591:1
2022-08-19 13:40:48 +00:00
|
2022-10-13 09:13:02 +00:00
LL | #[lint(no_crate_example, code = "E0123")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2022-08-19 13:40:48 +00:00
error: diagnostic slug not specified
2023-04-03 14:36:50 +00:00
--> $DIR/diagnostic-derive.rs:591:1
2022-08-19 13:40:48 +00:00
|
2022-10-13 09:13:02 +00:00
LL | / #[lint(no_crate_example, code = "E0123")]
2022-08-19 13:40:48 +00:00
LL | |
LL | |
LL | |
LL | | struct LintAttributeOnSessionDiag {}
| |____________________________________^
|
2022-10-22 09:08:09 +00:00
= help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]`
2022-08-19 13:40:48 +00:00
error: `#[lint(...)]` is not a valid attribute
2023-04-03 14:36:50 +00:00
--> $DIR/diagnostic-derive.rs:598:1
2022-08-19 13:40:48 +00:00
|
2022-10-13 09:13:02 +00:00
LL | #[lint(no_crate_example, code = "E0123")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2022-08-19 13:40:48 +00:00
2022-09-22 14:25:05 +00:00
error: `#[lint(...)]` is not a valid attribute
2023-04-03 14:36:50 +00:00
--> $DIR/diagnostic-derive.rs:598:1
2022-09-22 14:25:05 +00:00
|
2022-10-13 09:13:02 +00:00
LL | #[lint(no_crate_example, code = "E0123")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2022-09-22 14:25:05 +00:00
2022-08-19 13:40:48 +00:00
error: diagnostic slug not specified
2023-04-03 14:36:50 +00:00
--> $DIR/diagnostic-derive.rs:598:1
2022-08-19 13:40:48 +00:00
|
2022-10-13 09:13:02 +00:00
LL | / #[lint(no_crate_example, code = "E0123")]
2022-08-19 13:40:48 +00:00
LL | |
LL | |
LL | |
2022-09-22 14:25:05 +00:00
LL | |
2022-08-19 13:40:48 +00:00
LL | | struct LintAttributeOnLintDiag {}
| |_________________________________^
|
2022-10-22 09:08:09 +00:00
= help: specify the slug as the first argument to the attribute, such as `#[diag(compiletest_example)]`
2022-08-19 13:04:34 +00:00
2022-09-10 12:28:12 +00:00
error: specified multiple times
2023-04-03 15:11:30 +00:00
--> $DIR/diagnostic-derive.rs:608:53
2022-09-10 12:28:12 +00:00
|
2022-10-13 09:13:02 +00:00
LL | #[suggestion(no_crate_suggestion, code = "...", code = ",,,")]
2023-04-03 15:11:30 +00:00
| ^^^^
2022-09-10 12:28:12 +00:00
|
note: previously specified here
2023-04-03 15:11:30 +00:00
--> $DIR/diagnostic-derive.rs:608:39
2022-09-10 12:28:12 +00:00
|
2022-10-13 09:13:02 +00:00
LL | #[suggestion(no_crate_suggestion, code = "...", code = ",,,")]
2023-04-03 15:11:30 +00:00
| ^^^^
2022-09-10 12:28:12 +00:00
2022-09-10 12:43:07 +00:00
error: wrong types for suggestion
2023-04-03 14:36:50 +00:00
--> $DIR/diagnostic-derive.rs:617:24
2022-09-10 12:43:07 +00:00
|
LL | suggestion: (Span, usize),
| ^^^^^
|
= help: `#[suggestion(...)]` on a tuple field must be applied to fields of type `(Span, Applicability)`
error: wrong types for suggestion
2023-04-03 14:36:50 +00:00
--> $DIR/diagnostic-derive.rs:625:17
2022-09-10 12:43:07 +00:00
|
LL | suggestion: (Span,),
| ^^^^^^^
|
= help: `#[suggestion(...)]` on a tuple field must be applied to fields of type `(Span, Applicability)`
2022-09-14 15:19:40 +00:00
error: suggestion without `code = "..."`
2023-04-03 14:36:50 +00:00
--> $DIR/diagnostic-derive.rs:632:5
2022-09-14 15:19:40 +00:00
|
2022-10-13 09:13:02 +00:00
LL | #[suggestion(no_crate_suggestion)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2022-09-14 15:19:40 +00:00
error: `#[multipart_suggestion(...)]` is not a valid attribute
2023-04-03 14:36:50 +00:00
--> $DIR/diagnostic-derive.rs:639:1
2022-09-14 15:19:40 +00:00
|
2022-10-13 09:13:02 +00:00
LL | #[multipart_suggestion(no_crate_suggestion)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2022-09-14 15:19:40 +00:00
|
= help: consider creating a `Subdiagnostic` instead
error: `#[multipart_suggestion(...)]` is not a valid attribute
2023-04-03 14:36:50 +00:00
--> $DIR/diagnostic-derive.rs:646:5
2022-09-14 15:19:40 +00:00
|
2022-10-13 09:13:02 +00:00
LL | #[multipart_suggestion(no_crate_suggestion)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2022-09-14 15:19:40 +00:00
|
= help: consider creating a `Subdiagnostic` instead
2023-04-03 14:36:50 +00:00
error: unexpected end of input, unexpected token in nested attribute, expected ident
--> $DIR/diagnostic-derive.rs:642:24
|
LL | #[multipart_suggestion()]
| ^
2022-09-14 15:19:40 +00:00
error: `#[suggestion(...)]` is not a valid attribute
2023-04-03 14:36:50 +00:00
--> $DIR/diagnostic-derive.rs:654:1
2022-09-14 15:19:40 +00:00
|
2022-10-13 09:13:02 +00:00
LL | #[suggestion(no_crate_suggestion, code = "...")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2022-09-14 15:19:40 +00:00
|
= help: `#[label]` and `#[suggestion]` can only be applied to fields
error: `#[label]` is not a valid attribute
2023-04-03 14:36:50 +00:00
--> $DIR/diagnostic-derive.rs:663:1
2022-09-14 15:19:40 +00:00
|
LL | #[label]
| ^^^^^^^^
|
= help: `#[label]` and `#[suggestion]` can only be applied to fields
2023-04-03 14:36:50 +00:00
error: `eager` is the only supported nested attribute for `subdiagnostic`
--> $DIR/diagnostic-derive.rs:697:7
2022-10-03 13:24:17 +00:00
|
LL | #[subdiagnostic(bad)]
2023-04-03 14:36:50 +00:00
| ^^^^^^^^^^^^^^^^^^
2022-10-03 13:24:17 +00:00
error: `#[subdiagnostic = ...]` is not a valid attribute
2023-04-03 14:36:50 +00:00
--> $DIR/diagnostic-derive.rs:705:5
2022-10-03 13:24:17 +00:00
|
LL | #[subdiagnostic = "bad"]
| ^^^^^^^^^^^^^^^^^^^^^^^^
2023-04-03 14:36:50 +00:00
error: `eager` is the only supported nested attribute for `subdiagnostic`
--> $DIR/diagnostic-derive.rs:713:7
2022-10-03 13:24:17 +00:00
|
LL | #[subdiagnostic(bad, bad)]
2023-04-03 14:36:50 +00:00
| ^^^^^^^^^^^^^^^^^^^^^^^
2022-10-03 13:24:17 +00:00
2023-04-03 14:36:50 +00:00
error: `eager` is the only supported nested attribute for `subdiagnostic`
--> $DIR/diagnostic-derive.rs:721:7
2022-10-03 13:24:17 +00:00
|
LL | #[subdiagnostic("bad")]
2023-04-03 14:36:50 +00:00
| ^^^^^^^^^^^^^^^^^^^^
2022-10-03 13:24:17 +00:00
error: `#[subdiagnostic(...)]` is not a valid attribute
2023-04-03 14:36:50 +00:00
--> $DIR/diagnostic-derive.rs:729:5
2022-10-03 13:24:17 +00:00
|
LL | #[subdiagnostic(eager)]
| ^^^^^^^^^^^^^^^^^^^^^^^
|
2023-01-08 23:00:41 +00:00
= help: eager subdiagnostics are not supported on lints
2022-10-03 13:24:17 +00:00
2022-10-17 17:41:49 +00:00
error: expected at least one string literal for `code(...)`
2023-04-03 14:36:50 +00:00
--> $DIR/diagnostic-derive.rs:787:23
2022-10-17 17:41:49 +00:00
|
LL | #[suggestion(code())]
2023-04-03 14:36:50 +00:00
| ^
2022-10-17 17:41:49 +00:00
error: `code(...)` must contain only string literals
2023-04-03 14:36:50 +00:00
--> $DIR/diagnostic-derive.rs:795:23
2022-10-17 17:41:49 +00:00
|
LL | #[suggestion(code(foo))]
| ^^^
2023-04-03 14:36:50 +00:00
error: unexpected token
--> $DIR/diagnostic-derive.rs:795:23
|
LL | #[suggestion(code(foo))]
| ^^^
error: expected string literal
--> $DIR/diagnostic-derive.rs:804:25
2022-10-17 17:41:49 +00:00
|
LL | #[suggestion(code = 3)]
2023-04-03 14:36:50 +00:00
| ^
2022-10-17 17:41:49 +00:00
2022-10-16 14:15:39 +00:00
error: `#[suggestion(...)]` is not a valid attribute
2023-04-03 14:36:50 +00:00
--> $DIR/diagnostic-derive.rs:819:5
2022-10-16 14:15:39 +00:00
|
2022-10-13 09:13:02 +00:00
LL | #[suggestion(no_crate_suggestion, code = "")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2022-10-16 14:15:39 +00:00
|
= note: `#[suggestion(...)]` applied to `Vec` field is ambiguous
= help: to show a suggestion consisting of multiple parts, use a `Subdiagnostic` annotated with `#[multipart_suggestion(...)]`
= help: to show a variable set of suggestions, use a `Vec` of `Subdiagnostic`s annotated with `#[suggestion(...)]`
2022-03-31 07:35:17 +00:00
error: cannot find attribute `nonsense` in this scope
2022-10-13 09:13:02 +00:00
--> $DIR/diagnostic-derive.rs:57:3
2022-03-31 07:35:17 +00:00
|
2022-10-13 09:13:02 +00:00
LL | #[nonsense(no_crate_example, code = "E0123")]
2022-03-31 07:35:17 +00:00
| ^^^^^^^^
error: cannot find attribute `nonsense` in this scope
2023-04-03 14:36:50 +00:00
--> $DIR/diagnostic-derive.rs:144: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
2023-04-03 14:36:50 +00:00
--> $DIR/diagnostic-derive.rs:577:3
2022-08-19 13:40:48 +00:00
|
2022-10-13 09:13:02 +00:00
LL | #[error(no_crate_example, code = "E0123")]
2022-08-19 13:40:48 +00:00
| ^^^^^
2022-08-24 15:57:10 +00:00
error: cannot find attribute `warn_` in this scope
2023-04-03 14:36:50 +00:00
--> $DIR/diagnostic-derive.rs:584:3
2022-08-19 13:40:48 +00:00
|
2022-10-13 09:13:02 +00:00
LL | #[warn_(no_crate_example, code = "E0123")]
2022-08-24 15:57:10 +00:00
| ^^^^^ 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
2023-04-03 14:36:50 +00:00
--> $DIR/diagnostic-derive.rs:591:3
2022-08-19 13:40:48 +00:00
|
2022-10-13 09:13:02 +00:00
LL | #[lint(no_crate_example, code = "E0123")]
2022-08-19 13:40:48 +00:00
| ^^^^ help: a built-in attribute with a similar name exists: `link`
error: cannot find attribute `lint` in this scope
2023-04-03 14:36:50 +00:00
--> $DIR/diagnostic-derive.rs:598:3
2022-08-19 13:40:48 +00:00
|
2022-10-13 09:13:02 +00:00
LL | #[lint(no_crate_example, code = "E0123")]
2022-08-19 13:40:48 +00:00
| ^^^^ help: a built-in attribute with a similar name exists: `link`
2022-09-14 15:19:40 +00:00
error: cannot find attribute `multipart_suggestion` in this scope
2023-04-03 14:36:50 +00:00
--> $DIR/diagnostic-derive.rs:639:3
2022-09-14 15:19:40 +00:00
|
2022-10-13 09:13:02 +00:00
LL | #[multipart_suggestion(no_crate_suggestion)]
2022-09-14 15:19:40 +00:00
| ^^^^^^^^^^^^^^^^^^^^
error: cannot find attribute `multipart_suggestion` in this scope
2023-04-03 14:36:50 +00:00
--> $DIR/diagnostic-derive.rs:642:3
2022-09-14 15:19:40 +00:00
|
LL | #[multipart_suggestion()]
| ^^^^^^^^^^^^^^^^^^^^
error: cannot find attribute `multipart_suggestion` in this scope
2023-04-03 14:36:50 +00:00
--> $DIR/diagnostic-derive.rs:646:7
2022-09-14 15:19:40 +00:00
|
2022-10-13 09:13:02 +00:00
LL | #[multipart_suggestion(no_crate_suggestion)]
2022-09-14 15:19:40 +00:00
| ^^^^^^^^^^^^^^^^^^^^
2022-10-13 09:13:02 +00:00
error[E0425]: cannot find value `nonsense` in module `crate::fluent_generated`
2023-04-03 14:36:50 +00:00
--> $DIR/diagnostic-derive.rs:69:8
2022-06-23 13:51:44 +00:00
|
2022-08-19 13:40:48 +00:00
LL | #[diag(nonsense, code = "E0123")]
2022-10-13 09:13:02 +00:00
| ^^^^^^^^ not found in `crate::fluent_generated`
2022-06-23 13:51:44 +00:00
2023-04-03 14:36:50 +00:00
error[E0425]: cannot find value `__code_34` in this scope
--> $DIR/diagnostic-derive.rs:801:10
|
LL | #[derive(Diagnostic)]
| ^^^^^^^^^^ not found in this scope
|
= note: this error originates in the derive macro `Diagnostic` (in Nightly builds, run with -Z macro-backtrace for more info)
2022-05-07 06:26:03 +00:00
error[E0277]: the trait bound `Hello: IntoDiagnosticArg` is not satisfied
2023-04-03 14:36:50 +00:00
--> $DIR/diagnostic-derive.rs:338: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-12-12 17:32:20 +00:00
= note: this error originates in the derive macro `Diagnostic` which comes from the expansion of the macro `forward` (in Nightly builds, run with -Z macro-backtrace for more info)
2022-03-31 08:02:31 +00:00
2023-04-03 14:36:50 +00:00
error: aborting due to 84 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`.