summaryrefslogtreecommitdiffstats
path: root/src/test/ui-fulldeps/session-diagnostic/subdiagnostic-derive.stderr
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/test/ui-fulldeps/session-diagnostic/subdiagnostic-derive.stderr376
1 files changed, 243 insertions, 133 deletions
diff --git a/src/test/ui-fulldeps/session-diagnostic/subdiagnostic-derive.stderr b/src/test/ui-fulldeps/session-diagnostic/subdiagnostic-derive.stderr
index a289c4fff..a85a8711e 100644
--- a/src/test/ui-fulldeps/session-diagnostic/subdiagnostic-derive.stderr
+++ b/src/test/ui-fulldeps/session-diagnostic/subdiagnostic-derive.stderr
@@ -1,14 +1,14 @@
error: label without `#[primary_span]` field
--> $DIR/subdiagnostic-derive.rs:47:1
|
-LL | / #[label(parser::add_paren)]
+LL | / #[label(parser_add_paren)]
LL | |
LL | | struct C {
LL | | var: String,
LL | | }
| |_^
-error: `#[label]` is not a valid attribute
+error: diagnostic slug must be first argument of a `#[label(...)]` attribute
--> $DIR/subdiagnostic-derive.rs:54:1
|
LL | #[label]
@@ -31,105 +31,119 @@ error: `#[label(bug = ...)]` is not a valid attribute
|
LL | #[label(bug = "...")]
| ^^^^^^^^^^^
+
+error: diagnostic slug must be first argument of a `#[label(...)]` attribute
+ --> $DIR/subdiagnostic-derive.rs:82:1
|
- = help: first argument of the attribute should be the diagnostic slug
+LL | #[label(bug = "...")]
+ | ^^^^^^^^^^^^^^^^^^^^^
error: `#[label("...")]` is not a valid attribute
- --> $DIR/subdiagnostic-derive.rs:91:9
+ --> $DIR/subdiagnostic-derive.rs:92:9
|
LL | #[label("...")]
| ^^^^^
+
+error: diagnostic slug must be first argument of a `#[label(...)]` attribute
+ --> $DIR/subdiagnostic-derive.rs:92:1
|
- = help: first argument of the attribute should be the diagnostic slug
+LL | #[label("...")]
+ | ^^^^^^^^^^^^^^^
error: `#[label(slug = ...)]` is not a valid attribute
- --> $DIR/subdiagnostic-derive.rs:100:9
+ --> $DIR/subdiagnostic-derive.rs:102:9
|
LL | #[label(slug = 4)]
| ^^^^^^^^
+
+error: diagnostic slug must be first argument of a `#[label(...)]` attribute
+ --> $DIR/subdiagnostic-derive.rs:102:1
|
- = help: first argument of the attribute should be the diagnostic slug
+LL | #[label(slug = 4)]
+ | ^^^^^^^^^^^^^^^^^^
error: `#[label(slug(...))]` is not a valid attribute
- --> $DIR/subdiagnostic-derive.rs:109:9
+ --> $DIR/subdiagnostic-derive.rs:112:9
|
LL | #[label(slug("..."))]
| ^^^^^^^^^^^
+
+error: diagnostic slug must be first argument of a `#[label(...)]` attribute
+ --> $DIR/subdiagnostic-derive.rs:112:1
|
- = help: first argument of the attribute should be the diagnostic slug
+LL | #[label(slug("..."))]
+ | ^^^^^^^^^^^^^^^^^^^^^
error: diagnostic slug must be first argument of a `#[label(...)]` attribute
- --> $DIR/subdiagnostic-derive.rs:128:1
+ --> $DIR/subdiagnostic-derive.rs:132:1
|
LL | #[label()]
| ^^^^^^^^^^
-error: `code` is not a valid nested attribute of a `label` attribute
- --> $DIR/subdiagnostic-derive.rs:137:1
+error: `#[label(code = ...)]` is not a valid attribute
+ --> $DIR/subdiagnostic-derive.rs:141:27
|
-LL | #[label(parser::add_paren, code = "...")]
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | #[label(parser_add_paren, code = "...")]
+ | ^^^^^^^^^^^^
-error: `applicability` is not a valid nested attribute of a `label` attribute
- --> $DIR/subdiagnostic-derive.rs:146:1
+error: `#[label(applicability = ...)]` is not a valid attribute
+ --> $DIR/subdiagnostic-derive.rs:150:27
|
-LL | #[label(parser::add_paren, applicability = "machine-applicable")]
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | #[label(parser_add_paren, applicability = "machine-applicable")]
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: unsupported type attribute for subdiagnostic enum
- --> $DIR/subdiagnostic-derive.rs:155:1
+ --> $DIR/subdiagnostic-derive.rs:159:1
|
LL | #[foo]
| ^^^^^^
error: `#[bar]` is not a valid attribute
- --> $DIR/subdiagnostic-derive.rs:169:5
+ --> $DIR/subdiagnostic-derive.rs:173:5
|
LL | #[bar]
| ^^^^^^
error: `#[bar = ...]` is not a valid attribute
- --> $DIR/subdiagnostic-derive.rs:181:5
+ --> $DIR/subdiagnostic-derive.rs:185:5
|
LL | #[bar = "..."]
| ^^^^^^^^^^^^^^
error: `#[bar = ...]` is not a valid attribute
- --> $DIR/subdiagnostic-derive.rs:193:5
+ --> $DIR/subdiagnostic-derive.rs:197:5
|
LL | #[bar = 4]
| ^^^^^^^^^^
-error: `#[bar("...")]` is not a valid attribute
- --> $DIR/subdiagnostic-derive.rs:205:11
+error: `#[bar(...)]` is not a valid attribute
+ --> $DIR/subdiagnostic-derive.rs:209:5
|
LL | #[bar("...")]
- | ^^^^^
+ | ^^^^^^^^^^^^^
+
+error: `#[label(code = ...)]` is not a valid attribute
+ --> $DIR/subdiagnostic-derive.rs:221:13
|
- = help: first argument of the attribute should be the diagnostic slug
+LL | #[label(code = "...")]
+ | ^^^^^^^^^^^^
error: diagnostic slug must be first argument of a `#[label(...)]` attribute
- --> $DIR/subdiagnostic-derive.rs:217:5
+ --> $DIR/subdiagnostic-derive.rs:221:5
|
LL | #[label(code = "...")]
| ^^^^^^^^^^^^^^^^^^^^^^
-error: subdiagnostic kind not specified
- --> $DIR/subdiagnostic-derive.rs:234:5
- |
-LL | B {
- | ^
-
error: the `#[primary_span]` attribute can only be applied to fields of type `Span` or `MultiSpan`
- --> $DIR/subdiagnostic-derive.rs:246:5
+ --> $DIR/subdiagnostic-derive.rs:250:5
|
LL | #[primary_span]
| ^^^^^^^^^^^^^^^
error: label without `#[primary_span]` field
- --> $DIR/subdiagnostic-derive.rs:243:1
+ --> $DIR/subdiagnostic-derive.rs:247:1
|
-LL | / #[label(parser::add_paren)]
+LL | / #[label(parser_add_paren)]
LL | |
LL | | struct W {
LL | | #[primary_span]
@@ -139,13 +153,13 @@ LL | | }
| |_^
error: `#[applicability]` is only valid on suggestions
- --> $DIR/subdiagnostic-derive.rs:256:5
+ --> $DIR/subdiagnostic-derive.rs:260:5
|
LL | #[applicability]
| ^^^^^^^^^^^^^^^^
error: `#[bar]` is not a valid attribute
- --> $DIR/subdiagnostic-derive.rs:266:5
+ --> $DIR/subdiagnostic-derive.rs:270:5
|
LL | #[bar]
| ^^^^^^
@@ -153,19 +167,21 @@ LL | #[bar]
= help: only `primary_span`, `applicability` and `skip_arg` are valid field attributes
error: `#[bar = ...]` is not a valid attribute
- --> $DIR/subdiagnostic-derive.rs:277:5
+ --> $DIR/subdiagnostic-derive.rs:281:5
|
LL | #[bar = "..."]
| ^^^^^^^^^^^^^^
error: `#[bar(...)]` is not a valid attribute
- --> $DIR/subdiagnostic-derive.rs:288:5
+ --> $DIR/subdiagnostic-derive.rs:292:5
|
LL | #[bar("...")]
| ^^^^^^^^^^^^^
+ |
+ = help: only `primary_span`, `applicability` and `skip_arg` are valid field attributes
error: unexpected unsupported untagged union
- --> $DIR/subdiagnostic-derive.rs:304:1
+ --> $DIR/subdiagnostic-derive.rs:308:1
|
LL | / union AC {
LL | |
@@ -174,35 +190,11 @@ LL | | b: u64
LL | | }
| |_^
-error: specified multiple times
- --> $DIR/subdiagnostic-derive.rs:314:1
- |
-LL | #[label(parser::add_paren)]
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
- |
-note: previously specified here
- --> $DIR/subdiagnostic-derive.rs:311:1
- |
-LL | #[label(parser::add_paren)]
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error: specified multiple times
- --> $DIR/subdiagnostic-derive.rs:314:1
- |
-LL | #[label(parser::add_paren)]
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
- |
-note: previously specified here
- --> $DIR/subdiagnostic-derive.rs:311:1
- |
-LL | #[label(parser::add_paren)]
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error: `#[label(parser::add_paren)]` is not a valid attribute
- --> $DIR/subdiagnostic-derive.rs:323:28
+error: `#[label(parser_add_paren)]` is not a valid attribute
+ --> $DIR/subdiagnostic-derive.rs:323:27
|
-LL | #[label(parser::add_paren, parser::add_paren)]
- | ^^^^^^^^^^^^^^^^^
+LL | #[label(parser_add_paren, parser_add_paren)]
+ | ^^^^^^^^^^^^^^^^
|
= help: a diagnostic slug must be the first argument to the attribute
@@ -225,16 +217,16 @@ LL | struct AG {
| ^^
error: specified multiple times
- --> $DIR/subdiagnostic-derive.rs:379:47
+ --> $DIR/subdiagnostic-derive.rs:379:46
|
-LL | #[suggestion(parser::add_paren, code = "...", code = "...")]
- | ^^^^^^^^^^^^
+LL | #[suggestion(parser_add_paren, code = "...", code = "...")]
+ | ^^^^^^^^^^^^
|
note: previously specified here
- --> $DIR/subdiagnostic-derive.rs:379:33
+ --> $DIR/subdiagnostic-derive.rs:379:32
|
-LL | #[suggestion(parser::add_paren, code = "...", code = "...")]
- | ^^^^^^^^^^^^
+LL | #[suggestion(parser_add_paren, code = "...", code = "...")]
+ | ^^^^^^^^^^^^
error: specified multiple times
--> $DIR/subdiagnostic-derive.rs:397:5
@@ -249,91 +241,209 @@ LL | #[applicability]
| ^^^^^^^^^^^^^^^^
error: the `#[applicability]` attribute can only be applied to fields of type `Applicability`
- --> $DIR/subdiagnostic-derive.rs:408:5
+ --> $DIR/subdiagnostic-derive.rs:407:5
|
LL | #[applicability]
| ^^^^^^^^^^^^^^^^
-error: suggestion without `applicability`
- --> $DIR/subdiagnostic-derive.rs:403:1
+error: suggestion without `code = "..."`
+ --> $DIR/subdiagnostic-derive.rs:420:1
|
-LL | / #[suggestion(parser::add_paren, code = "...")]
-LL | |
-LL | | struct AL {
-LL | | #[primary_span]
-... |
-LL | | applicability: Span,
-LL | | }
- | |_^
+LL | #[suggestion(parser_add_paren)]
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: suggestion without `applicability`
- --> $DIR/subdiagnostic-derive.rs:414:1
+error: invalid applicability
+ --> $DIR/subdiagnostic-derive.rs:430:45
+ |
+LL | #[suggestion(parser_add_paren, code ="...", applicability = "foo")]
+ | ^^^^^^^^^^^^^^^^^^^^^
+
+error: suggestion without `#[primary_span]` field
+ --> $DIR/subdiagnostic-derive.rs:448:1
|
-LL | / #[suggestion(parser::add_paren, code = "...")]
+LL | / #[suggestion(parser_add_paren, code = "...")]
LL | |
-LL | | struct AM {
-LL | | #[primary_span]
-LL | | span: Span,
+LL | | struct AR {
+LL | | var: String,
LL | | }
| |_^
-error: suggestion without `code = "..."`
- --> $DIR/subdiagnostic-derive.rs:422:1
+error: unsupported type attribute for subdiagnostic enum
+ --> $DIR/subdiagnostic-derive.rs:462:1
+ |
+LL | #[label]
+ | ^^^^^^^^
+
+error: `var` doesn't refer to a field on this type
+ --> $DIR/subdiagnostic-derive.rs:482:38
+ |
+LL | #[suggestion(parser_add_paren, code ="{var}", applicability = "machine-applicable")]
+ | ^^^^^^^
+
+error: `var` doesn't refer to a field on this type
+ --> $DIR/subdiagnostic-derive.rs:501:42
|
-LL | / #[suggestion(parser::add_paren)]
+LL | #[suggestion(parser_add_paren, code ="{var}", applicability = "machine-applicable")]
+ | ^^^^^^^
+
+error: `#[suggestion_part]` is not a valid attribute
+ --> $DIR/subdiagnostic-derive.rs:524:5
+ |
+LL | #[suggestion_part]
+ | ^^^^^^^^^^^^^^^^^^
+ |
+ = help: `#[suggestion_part(...)]` is only valid in multipart suggestions, use `#[primary_span]` instead
+
+error: `#[suggestion_part(...)]` is not a valid attribute
+ --> $DIR/subdiagnostic-derive.rs:527:5
+ |
+LL | #[suggestion_part(code = "...")]
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ |
+ = help: `#[suggestion_part(...)]` is only valid in multipart suggestions
+
+error: suggestion without `#[primary_span]` field
+ --> $DIR/subdiagnostic-derive.rs:521:1
+ |
+LL | / #[suggestion(parser_add_paren, code = "...")]
LL | |
-LL | | struct AN {
-LL | | #[primary_span]
+LL | | struct BA {
+LL | | #[suggestion_part]
... |
-LL | | applicability: Applicability,
+LL | | var: String,
LL | | }
| |_^
-error: invalid applicability
- --> $DIR/subdiagnostic-derive.rs:432:46
+error: `#[multipart_suggestion(code = ...)]` is not a valid attribute
+ --> $DIR/subdiagnostic-derive.rs:536:42
|
-LL | #[suggestion(parser::add_paren, code ="...", applicability = "foo")]
- | ^^^^^^^^^^^^^^^^^^^^^
+LL | #[multipart_suggestion(parser_add_paren, code = "...", applicability = "machine-applicable")]
+ | ^^^^^^^^^^^^
+ |
+ = help: only `applicability` is a valid nested attributes
-error: suggestion without `applicability`
- --> $DIR/subdiagnostic-derive.rs:450:1
+error: multipart suggestion without any `#[suggestion_part(...)]` fields
+ --> $DIR/subdiagnostic-derive.rs:536:1
|
-LL | / #[suggestion(parser::add_paren, code = "...")]
+LL | / #[multipart_suggestion(parser_add_paren, code = "...", applicability = "machine-applicable")]
LL | |
LL | |
-LL | | struct AR {
+LL | | struct BBa {
LL | | var: String,
LL | | }
| |_^
-error: suggestion without `#[primary_span]` field
- --> $DIR/subdiagnostic-derive.rs:450:1
+error: `#[suggestion_part(...)]` attribute without `code = "..."`
+ --> $DIR/subdiagnostic-derive.rs:546:5
|
-LL | / #[suggestion(parser::add_paren, code = "...")]
+LL | #[suggestion_part]
+ | ^^^^^^^^^^^^^^^^^^
+
+error: `#[suggestion_part(...)]` attribute without `code = "..."`
+ --> $DIR/subdiagnostic-derive.rs:554:5
+ |
+LL | #[suggestion_part()]
+ | ^^^^^^^^^^^^^^^^^^^^
+
+error: `#[primary_span]` is not a valid attribute
+ --> $DIR/subdiagnostic-derive.rs:563:5
+ |
+LL | #[primary_span]
+ | ^^^^^^^^^^^^^^^
+ |
+ = help: multipart suggestions use one or more `#[suggestion_part]`s rather than one `#[primary_span]`
+
+error: multipart suggestion without any `#[suggestion_part(...)]` fields
+ --> $DIR/subdiagnostic-derive.rs:560:1
+ |
+LL | / #[multipart_suggestion(parser_add_paren)]
LL | |
+LL | | struct BC {
+LL | | #[primary_span]
LL | |
-LL | | struct AR {
-LL | | var: String,
+LL | | span: Span,
LL | | }
| |_^
-error: unsupported type attribute for subdiagnostic enum
- --> $DIR/subdiagnostic-derive.rs:465:1
+error: `#[suggestion_part(...)]` attribute without `code = "..."`
+ --> $DIR/subdiagnostic-derive.rs:571:5
|
-LL | #[label]
- | ^^^^^^^^
+LL | #[suggestion_part]
+ | ^^^^^^^^^^^^^^^^^^
-error: `var` doesn't refer to a field on this type
- --> $DIR/subdiagnostic-derive.rs:485:39
+error: `#[suggestion_part(...)]` attribute without `code = "..."`
+ --> $DIR/subdiagnostic-derive.rs:574:5
|
-LL | #[suggestion(parser::add_paren, code ="{var}", applicability = "machine-applicable")]
- | ^^^^^^^
+LL | #[suggestion_part()]
+ | ^^^^^^^^^^^^^^^^^^^^
-error: `var` doesn't refer to a field on this type
- --> $DIR/subdiagnostic-derive.rs:504:43
+error: `#[suggestion_part(foo = ...)]` is not a valid attribute
+ --> $DIR/subdiagnostic-derive.rs:577:23
+ |
+LL | #[suggestion_part(foo = "bar")]
+ | ^^^^^^^^^^^
+ |
+ = help: `code` is the only valid nested attribute
+
+error: the `#[suggestion_part(...)]` attribute can only be applied to fields of type `Span` or `MultiSpan`
+ --> $DIR/subdiagnostic-derive.rs:580:5
+ |
+LL | #[suggestion_part(code = "...")]
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: the `#[suggestion_part(...)]` attribute can only be applied to fields of type `Span` or `MultiSpan`
+ --> $DIR/subdiagnostic-derive.rs:583:5
+ |
+LL | #[suggestion_part()]
+ | ^^^^^^^^^^^^^^^^^^^^
+
+error: specified multiple times
+ --> $DIR/subdiagnostic-derive.rs:591:37
+ |
+LL | #[suggestion_part(code = "...", code = ",,,")]
+ | ^^^^^^^^^^^^
+ |
+note: previously specified here
+ --> $DIR/subdiagnostic-derive.rs:591:23
+ |
+LL | #[suggestion_part(code = "...", code = ",,,")]
+ | ^^^^^^^^^^^^
+
+error: `#[applicability]` has no effect if all `#[suggestion]`/`#[multipart_suggestion]` attributes have a static `applicability = "..."`
+ --> $DIR/subdiagnostic-derive.rs:620:5
+ |
+LL | #[applicability]
+ | ^^^^^^^^^^^^^^^^
+
+error: expected exactly one string literal for `code = ...`
+ --> $DIR/subdiagnostic-derive.rs:668:23
+ |
+LL | #[suggestion_part(code("foo"))]
+ | ^^^^^^^^^^^
+
+error: expected exactly one string literal for `code = ...`
+ --> $DIR/subdiagnostic-derive.rs:677:23
+ |
+LL | #[suggestion_part(code("foo", "bar"))]
+ | ^^^^^^^^^^^^^^^^^^
+
+error: expected exactly one string literal for `code = ...`
+ --> $DIR/subdiagnostic-derive.rs:686:23
+ |
+LL | #[suggestion_part(code(3))]
+ | ^^^^^^^
+
+error: expected exactly one string literal for `code = ...`
+ --> $DIR/subdiagnostic-derive.rs:695:23
+ |
+LL | #[suggestion_part(code())]
+ | ^^^^^^
+
+error: `code = "..."`/`code(...)` must contain only string literals
+ --> $DIR/subdiagnostic-derive.rs:704:23
|
-LL | #[suggestion(parser::add_paren, code ="{var}", applicability = "machine-applicable")]
- | ^^^^^^^
+LL | #[suggestion_part(code = 3)]
+ | ^^^^^^^^
error: cannot find attribute `foo` in this scope
--> $DIR/subdiagnostic-derive.rs:63:3
@@ -342,59 +452,59 @@ LL | #[foo]
| ^^^
error: cannot find attribute `foo` in this scope
- --> $DIR/subdiagnostic-derive.rs:155:3
+ --> $DIR/subdiagnostic-derive.rs:159:3
|
LL | #[foo]
| ^^^
error: cannot find attribute `bar` in this scope
- --> $DIR/subdiagnostic-derive.rs:169:7
+ --> $DIR/subdiagnostic-derive.rs:173:7
|
LL | #[bar]
| ^^^
error: cannot find attribute `bar` in this scope
- --> $DIR/subdiagnostic-derive.rs:181:7
+ --> $DIR/subdiagnostic-derive.rs:185:7
|
LL | #[bar = "..."]
| ^^^
error: cannot find attribute `bar` in this scope
- --> $DIR/subdiagnostic-derive.rs:193:7
+ --> $DIR/subdiagnostic-derive.rs:197:7
|
LL | #[bar = 4]
| ^^^
error: cannot find attribute `bar` in this scope
- --> $DIR/subdiagnostic-derive.rs:205:7
+ --> $DIR/subdiagnostic-derive.rs:209:7
|
LL | #[bar("...")]
| ^^^
error: cannot find attribute `bar` in this scope
- --> $DIR/subdiagnostic-derive.rs:266:7
+ --> $DIR/subdiagnostic-derive.rs:270:7
|
LL | #[bar]
| ^^^
error: cannot find attribute `bar` in this scope
- --> $DIR/subdiagnostic-derive.rs:277:7
+ --> $DIR/subdiagnostic-derive.rs:281:7
|
LL | #[bar = "..."]
| ^^^
error: cannot find attribute `bar` in this scope
- --> $DIR/subdiagnostic-derive.rs:288:7
+ --> $DIR/subdiagnostic-derive.rs:292:7
|
LL | #[bar("...")]
| ^^^
error[E0425]: cannot find value `slug` in module `rustc_errors::fluent`
- --> $DIR/subdiagnostic-derive.rs:118:9
+ --> $DIR/subdiagnostic-derive.rs:122:9
|
LL | #[label(slug)]
| ^^^^ not found in `rustc_errors::fluent`
-error: aborting due to 52 previous errors
+error: aborting due to 72 previous errors
For more information about this error, try `rustc --explain E0425`.