summaryrefslogtreecommitdiffstats
path: root/src/test/ui-fulldeps/session-diagnostic/diagnostic-derive.stderr
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:03:36 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:03:36 +0000
commit17d40c6057c88f4c432b0d7bac88e1b84cb7e67f (patch)
tree3f66c4a5918660bb8a758ab6cda5ff8ee4f6cdcd /src/test/ui-fulldeps/session-diagnostic/diagnostic-derive.stderr
parentAdding upstream version 1.64.0+dfsg1. (diff)
downloadrustc-f7f0cc2a5d72e2c61c1f6900e70eec992bea4273.tar.xz
rustc-f7f0cc2a5d72e2c61c1f6900e70eec992bea4273.zip
Adding upstream version 1.65.0+dfsg1.upstream/1.65.0+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/ui-fulldeps/session-diagnostic/diagnostic-derive.stderr')
-rw-r--r--src/test/ui-fulldeps/session-diagnostic/diagnostic-derive.stderr338
1 files changed, 190 insertions, 148 deletions
diff --git a/src/test/ui-fulldeps/session-diagnostic/diagnostic-derive.stderr b/src/test/ui-fulldeps/session-diagnostic/diagnostic-derive.stderr
index c1080aa24..ab5c28fe4 100644
--- a/src/test/ui-fulldeps/session-diagnostic/diagnostic-derive.stderr
+++ b/src/test/ui-fulldeps/session-diagnostic/diagnostic-derive.stderr
@@ -1,7 +1,7 @@
error: `#[derive(SessionDiagnostic)]` can only be used on structs
--> $DIR/diagnostic-derive.rs:39:1
|
-LL | / #[error(typeck::ambiguous_lifetime_bound, code = "E0123")]
+LL | / #[diag(typeck::ambiguous_lifetime_bound, code = "E0123")]
LL | |
LL | | enum SessionDiagnosticOnEnum {
LL | | Foo,
@@ -9,11 +9,11 @@ LL | | Bar,
LL | | }
| |_^
-error: `#[error = ...]` is not a valid attribute
+error: `#[diag = ...]` is not a valid attribute
--> $DIR/diagnostic-derive.rs:48:1
|
-LL | #[error = "E0123"]
- | ^^^^^^^^^^^^^^^^^^
+LL | #[diag = "E0123"]
+ | ^^^^^^^^^^^^^^^^^
error: `#[nonsense(...)]` is not a valid attribute
--> $DIR/diagnostic-derive.rs:53:1
@@ -21,9 +21,9 @@ error: `#[nonsense(...)]` is not a valid attribute
LL | #[nonsense(typeck::ambiguous_lifetime_bound, code = "E0123")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
- = help: only `error`, `warning`, `help`, `note` and `warn_` are valid attributes
+ = help: only `diag`, `help`, `note` and `warning` are valid attributes
-error: diagnostic kind not specified
+error: diagnostic slug not specified
--> $DIR/diagnostic-derive.rs:53:1
|
LL | / #[nonsense(typeck::ambiguous_lifetime_bound, code = "E0123")]
@@ -33,89 +33,89 @@ LL | |
LL | | struct InvalidStructAttr {}
| |___________________________^
|
- = help: use the `#[error(...)]` attribute to create an error
+ = help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(typeck::example_error)]`
-error: `#[error("...")]` is not a valid attribute
- --> $DIR/diagnostic-derive.rs:60:9
+error: `#[diag("...")]` is not a valid attribute
+ --> $DIR/diagnostic-derive.rs:60:8
|
-LL | #[error("E0123")]
- | ^^^^^^^
+LL | #[diag("E0123")]
+ | ^^^^^^^
|
= help: first argument of the attribute should be the diagnostic slug
error: diagnostic slug not specified
--> $DIR/diagnostic-derive.rs:60:1
|
-LL | / #[error("E0123")]
+LL | / #[diag("E0123")]
LL | |
LL | |
LL | | struct InvalidLitNestedAttr {}
| |______________________________^
|
- = help: specify the slug as the first argument to the attribute, such as `#[error(typeck::example_error)]`
+ = help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(typeck::example_error)]`
-error: `#[error(nonsense(...))]` is not a valid attribute
- --> $DIR/diagnostic-derive.rs:71:9
+error: `#[diag(nonsense(...))]` is not a valid attribute
+ --> $DIR/diagnostic-derive.rs:71:8
|
-LL | #[error(nonsense("foo"), code = "E0123", slug = "foo")]
- | ^^^^^^^^^^^^^^^
+LL | #[diag(nonsense("foo"), code = "E0123", slug = "foo")]
+ | ^^^^^^^^^^^^^^^
|
= help: first argument of the attribute should be the diagnostic slug
error: diagnostic slug not specified
--> $DIR/diagnostic-derive.rs:71:1
|
-LL | / #[error(nonsense("foo"), code = "E0123", slug = "foo")]
+LL | / #[diag(nonsense("foo"), code = "E0123", slug = "foo")]
LL | |
LL | |
LL | | struct InvalidNestedStructAttr1 {}
| |__________________________________^
|
- = help: specify the slug as the first argument to the attribute, such as `#[error(typeck::example_error)]`
+ = help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(typeck::example_error)]`
-error: `#[error(nonsense = ...)]` is not a valid attribute
- --> $DIR/diagnostic-derive.rs:77:9
+error: `#[diag(nonsense = ...)]` is not a valid attribute
+ --> $DIR/diagnostic-derive.rs:77:8
|
-LL | #[error(nonsense = "...", code = "E0123", slug = "foo")]
- | ^^^^^^^^^^^^^^^^
+LL | #[diag(nonsense = "...", code = "E0123", slug = "foo")]
+ | ^^^^^^^^^^^^^^^^
|
= help: first argument of the attribute should be the diagnostic slug
error: diagnostic slug not specified
--> $DIR/diagnostic-derive.rs:77:1
|
-LL | / #[error(nonsense = "...", code = "E0123", slug = "foo")]
+LL | / #[diag(nonsense = "...", code = "E0123", slug = "foo")]
LL | |
LL | |
LL | | struct InvalidNestedStructAttr2 {}
| |__________________________________^
|
- = help: specify the slug as the first argument to the attribute, such as `#[error(typeck::example_error)]`
+ = help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(typeck::example_error)]`
-error: `#[error(nonsense = ...)]` is not a valid attribute
- --> $DIR/diagnostic-derive.rs:83:9
+error: `#[diag(nonsense = ...)]` is not a valid attribute
+ --> $DIR/diagnostic-derive.rs:83:8
|
-LL | #[error(nonsense = 4, code = "E0123", slug = "foo")]
- | ^^^^^^^^^^^^
+LL | #[diag(nonsense = 4, code = "E0123", slug = "foo")]
+ | ^^^^^^^^^^^^
|
= help: first argument of the attribute should be the diagnostic slug
error: diagnostic slug not specified
--> $DIR/diagnostic-derive.rs:83:1
|
-LL | / #[error(nonsense = 4, code = "E0123", slug = "foo")]
+LL | / #[diag(nonsense = 4, code = "E0123", slug = "foo")]
LL | |
LL | |
LL | | struct InvalidNestedStructAttr3 {}
| |__________________________________^
|
- = help: specify the slug as the first argument to the attribute, such as `#[error(typeck::example_error)]`
+ = help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(typeck::example_error)]`
-error: `#[error(slug = ...)]` is not a valid attribute
- --> $DIR/diagnostic-derive.rs:89:59
+error: `#[diag(slug = ...)]` is not a valid attribute
+ --> $DIR/diagnostic-derive.rs:89:58
|
-LL | #[error(typeck::ambiguous_lifetime_bound, code = "E0123", slug = "foo")]
- | ^^^^^^^^^^^^
+LL | #[diag(typeck::ambiguous_lifetime_bound, code = "E0123", slug = "foo")]
+ | ^^^^^^^^^^^^
|
= help: only `code` is a valid nested attributes following the slug
@@ -128,119 +128,71 @@ LL | #[suggestion = "bar"]
error: specified multiple times
--> $DIR/diagnostic-derive.rs:103:1
|
-LL | #[error(typeck::ambiguous_lifetime_bound, code = "E0456")]
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- |
-note: previously specified here
- --> $DIR/diagnostic-derive.rs:102:1
- |
-LL | #[error(typeck::ambiguous_lifetime_bound, code = "E0123")]
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error: specified multiple times
- --> $DIR/diagnostic-derive.rs:103:1
- |
-LL | #[error(typeck::ambiguous_lifetime_bound, code = "E0456")]
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | #[diag(typeck::ambiguous_lifetime_bound, code = "E0456")]
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: previously specified here
--> $DIR/diagnostic-derive.rs:102:1
|
-LL | #[error(typeck::ambiguous_lifetime_bound, code = "E0123")]
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error: specified multiple times
- --> $DIR/diagnostic-derive.rs:103:50
- |
-LL | #[error(typeck::ambiguous_lifetime_bound, code = "E0456")]
- | ^^^^^^^
- |
-note: previously specified here
- --> $DIR/diagnostic-derive.rs:102:50
- |
-LL | #[error(typeck::ambiguous_lifetime_bound, code = "E0123")]
- | ^^^^^^^
-
-error: specified multiple times
- --> $DIR/diagnostic-derive.rs:111:1
- |
-LL | #[warning(typeck::ambiguous_lifetime_bound, code = "E0293")]
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- |
-note: previously specified here
- --> $DIR/diagnostic-derive.rs:110:1
- |
-LL | #[error(typeck::ambiguous_lifetime_bound, code = "E0123")]
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error: specified multiple times
- --> $DIR/diagnostic-derive.rs:111:1
- |
-LL | #[warning(typeck::ambiguous_lifetime_bound, code = "E0293")]
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- |
-note: previously specified here
- --> $DIR/diagnostic-derive.rs:110:1
- |
-LL | #[error(typeck::ambiguous_lifetime_bound, code = "E0123")]
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | #[diag(typeck::ambiguous_lifetime_bound, code = "E0123")]
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: specified multiple times
- --> $DIR/diagnostic-derive.rs:111:52
+ --> $DIR/diagnostic-derive.rs:103:49
|
-LL | #[warning(typeck::ambiguous_lifetime_bound, code = "E0293")]
- | ^^^^^^^
+LL | #[diag(typeck::ambiguous_lifetime_bound, code = "E0456")]
+ | ^^^^^^^
|
note: previously specified here
- --> $DIR/diagnostic-derive.rs:110:50
+ --> $DIR/diagnostic-derive.rs:102:49
|
-LL | #[error(typeck::ambiguous_lifetime_bound, code = "E0123")]
- | ^^^^^^^
+LL | #[diag(typeck::ambiguous_lifetime_bound, code = "E0123")]
+ | ^^^^^^^
error: specified multiple times
- --> $DIR/diagnostic-derive.rs:118:66
+ --> $DIR/diagnostic-derive.rs:109:65
|
-LL | #[error(typeck::ambiguous_lifetime_bound, code = "E0456", code = "E0457")]
- | ^^^^^^^
+LL | #[diag(typeck::ambiguous_lifetime_bound, code = "E0456", code = "E0457")]
+ | ^^^^^^^
|
note: previously specified here
- --> $DIR/diagnostic-derive.rs:118:50
+ --> $DIR/diagnostic-derive.rs:109:49
|
-LL | #[error(typeck::ambiguous_lifetime_bound, code = "E0456", code = "E0457")]
- | ^^^^^^^
+LL | #[diag(typeck::ambiguous_lifetime_bound, code = "E0456", code = "E0457")]
+ | ^^^^^^^
-error: `#[error(typeck::ambiguous_lifetime_bound)]` is not a valid attribute
- --> $DIR/diagnostic-derive.rs:123:43
+error: `#[diag(typeck::ambiguous_lifetime_bound)]` is not a valid attribute
+ --> $DIR/diagnostic-derive.rs:114:42
|
-LL | #[error(typeck::ambiguous_lifetime_bound, typeck::ambiguous_lifetime_bound, code = "E0456")]
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | #[diag(typeck::ambiguous_lifetime_bound, typeck::ambiguous_lifetime_bound, code = "E0456")]
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: diagnostic kind not specified
- --> $DIR/diagnostic-derive.rs:128:1
+error: diagnostic slug not specified
+ --> $DIR/diagnostic-derive.rs:119:1
|
LL | struct KindNotProvided {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
- = help: use the `#[error(...)]` attribute to create an error
+ = help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(typeck::example_error)]`
error: diagnostic slug not specified
- --> $DIR/diagnostic-derive.rs:131:1
+ --> $DIR/diagnostic-derive.rs:122:1
|
-LL | / #[error(code = "E0456")]
+LL | / #[diag(code = "E0456")]
LL | |
LL | | struct SlugNotProvided {}
| |_________________________^
|
- = help: specify the slug as the first argument to the attribute, such as `#[error(typeck::example_error)]`
+ = help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(typeck::example_error)]`
error: the `#[primary_span]` attribute can only be applied to fields of type `Span` or `MultiSpan`
- --> $DIR/diagnostic-derive.rs:142:5
+ --> $DIR/diagnostic-derive.rs:133:5
|
LL | #[primary_span]
| ^^^^^^^^^^^^^^^
error: `#[nonsense]` is not a valid attribute
- --> $DIR/diagnostic-derive.rs:150:5
+ --> $DIR/diagnostic-derive.rs:141:5
|
LL | #[nonsense]
| ^^^^^^^^^^^
@@ -248,19 +200,19 @@ LL | #[nonsense]
= help: only `skip_arg`, `primary_span`, `label`, `note`, `help` and `subdiagnostic` are valid field attributes
error: the `#[label(...)]` attribute can only be applied to fields of type `Span` or `MultiSpan`
- --> $DIR/diagnostic-derive.rs:167:5
+ --> $DIR/diagnostic-derive.rs:158:5
|
LL | #[label(typeck::label)]
| ^^^^^^^^^^^^^^^^^^^^^^^
error: `name` doesn't refer to a field on this type
- --> $DIR/diagnostic-derive.rs:175:45
+ --> $DIR/diagnostic-derive.rs:166:45
|
LL | #[suggestion(typeck::suggestion, code = "{name}")]
| ^^^^^^^^
error: invalid format string: expected `'}'` but string was terminated
- --> $DIR/diagnostic-derive.rs:180:16
+ --> $DIR/diagnostic-derive.rs:171:16
|
LL | #[derive(SessionDiagnostic)]
| - ^ expected `'}'` in format string
@@ -271,7 +223,7 @@ LL | #[derive(SessionDiagnostic)]
= note: this error originates in the derive macro `SessionDiagnostic` (in Nightly builds, run with -Z macro-backtrace for more info)
error: invalid format string: unmatched `}` found
- --> $DIR/diagnostic-derive.rs:190:15
+ --> $DIR/diagnostic-derive.rs:181:15
|
LL | #[derive(SessionDiagnostic)]
| ^ unmatched `}` in format string
@@ -280,13 +232,13 @@ LL | #[derive(SessionDiagnostic)]
= note: this error originates in the derive macro `SessionDiagnostic` (in Nightly builds, run with -Z macro-backtrace for more info)
error: the `#[label(...)]` attribute can only be applied to fields of type `Span` or `MultiSpan`
- --> $DIR/diagnostic-derive.rs:210:5
+ --> $DIR/diagnostic-derive.rs:201:5
|
LL | #[label(typeck::label)]
| ^^^^^^^^^^^^^^^^^^^^^^^
error: `#[suggestion(nonsense = ...)]` is not a valid attribute
- --> $DIR/diagnostic-derive.rs:235:18
+ --> $DIR/diagnostic-derive.rs:226:18
|
LL | #[suggestion(nonsense = "bar")]
| ^^^^^^^^^^^^^^^^
@@ -294,7 +246,7 @@ LL | #[suggestion(nonsense = "bar")]
= help: only `message`, `code` and `applicability` are valid field attributes
error: `#[suggestion(msg = ...)]` is not a valid attribute
- --> $DIR/diagnostic-derive.rs:243:18
+ --> $DIR/diagnostic-derive.rs:234:18
|
LL | #[suggestion(msg = "bar")]
| ^^^^^^^^^^^
@@ -302,7 +254,7 @@ LL | #[suggestion(msg = "bar")]
= help: only `message`, `code` and `applicability` are valid field attributes
error: wrong field type for suggestion
- --> $DIR/diagnostic-derive.rs:265:5
+ --> $DIR/diagnostic-derive.rs:256:5
|
LL | / #[suggestion(typeck::suggestion, code = "This is suggested code")]
LL | |
@@ -312,7 +264,7 @@ LL | | suggestion: Applicability,
= help: `#[suggestion(...)]` should be applied to fields of type `Span` or `(Span, Applicability)`
error: type of field annotated with `#[suggestion(...)]` contains more than one `Span`
- --> $DIR/diagnostic-derive.rs:280:5
+ --> $DIR/diagnostic-derive.rs:271:5
|
LL | / #[suggestion(typeck::suggestion, code = "This is suggested code")]
LL | |
@@ -320,7 +272,7 @@ LL | | suggestion: (Span, Span, Applicability),
| |___________________________________________^
error: type of field annotated with `#[suggestion(...)]` contains more than one Applicability
- --> $DIR/diagnostic-derive.rs:288:5
+ --> $DIR/diagnostic-derive.rs:279:5
|
LL | / #[suggestion(typeck::suggestion, code = "This is suggested code")]
LL | |
@@ -328,62 +280,128 @@ LL | | suggestion: (Applicability, Applicability, Span),
| |____________________________________________________^
error: `#[label = ...]` is not a valid attribute
- --> $DIR/diagnostic-derive.rs:296:5
+ --> $DIR/diagnostic-derive.rs:287:5
|
LL | #[label = "bar"]
| ^^^^^^^^^^^^^^^^
error: applicability cannot be set in both the field and attribute
- --> $DIR/diagnostic-derive.rs:447:52
+ --> $DIR/diagnostic-derive.rs:438:52
|
LL | #[suggestion(typeck::suggestion, code = "...", applicability = "maybe-incorrect")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: invalid applicability
- --> $DIR/diagnostic-derive.rs:455:52
+ --> $DIR/diagnostic-derive.rs:446:52
|
LL | #[suggestion(typeck::suggestion, code = "...", applicability = "batman")]
| ^^^^^^^^^^^^^^^^^^^^^^^^
error: `#[label(...)]` is not a valid attribute
- --> $DIR/diagnostic-derive.rs:518:5
+ --> $DIR/diagnostic-derive.rs:509:5
|
LL | #[label(typeck::label, foo)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: `#[label(...)]` is not a valid attribute
- --> $DIR/diagnostic-derive.rs:526:5
+ --> $DIR/diagnostic-derive.rs:517:5
|
LL | #[label(typeck::label, foo = "...")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: `#[label(...)]` is not a valid attribute
- --> $DIR/diagnostic-derive.rs:534:5
+ --> $DIR/diagnostic-derive.rs:525:5
|
LL | #[label(typeck::label, foo("..."))]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: only `#[error(..)]` and `#[warning(..)]` are supported
- --> $DIR/diagnostic-derive.rs:540:1
+error: `#[primary_span]` is not a valid attribute
+ --> $DIR/diagnostic-derive.rs:538:5
+ |
+LL | #[primary_span]
+ | ^^^^^^^^^^^^^^^
+ |
+ = help: the `primary_span` field attribute is not valid for lint diagnostics
+
+error: `#[error(...)]` is not a valid attribute
+ --> $DIR/diagnostic-derive.rs:558:1
|
-LL | / #[lint(typeck::ambiguous_lifetime_bound)]
+LL | #[error(typeck::ambiguous_lifetime_bound, code = "E0123")]
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ |
+ = help: `error` and `lint` have been replaced by `diag`
+
+error: diagnostic slug not specified
+ --> $DIR/diagnostic-derive.rs:558:1
+ |
+LL | / #[error(typeck::ambiguous_lifetime_bound, code = "E0123")]
LL | |
-LL | | struct LintsBad {
-LL | | }
- | |_^
+LL | |
+LL | |
+LL | | struct ErrorAttribute {}
+ | |________________________^
+ |
+ = help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(typeck::example_error)]`
+
+error: `#[warn_(...)]` is not a valid attribute
+ --> $DIR/diagnostic-derive.rs:565:1
+ |
+LL | #[warn_(typeck::ambiguous_lifetime_bound, code = "E0123")]
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
- = help: use the `#[error(...)]` attribute to create a error
+ = help: `warn_` have been replaced by `warning`
-error: only `#[lint(..)]` is supported
- --> $DIR/diagnostic-derive.rs:551:1
+error: diagnostic slug not specified
+ --> $DIR/diagnostic-derive.rs:565:1
|
-LL | / #[error(typeck::ambiguous_lifetime_bound)]
+LL | / #[warn_(typeck::ambiguous_lifetime_bound, code = "E0123")]
LL | |
-LL | | struct ErrorsBad {
-LL | | }
- | |_^
+LL | |
+LL | |
+LL | | struct WarnAttribute {}
+ | |_______________________^
|
- = help: use the `#[lint(...)]` attribute to create a lint
+ = 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")]
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ |
+ = help: `error` and `lint` have been replaced by `diag`
+
+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")]
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ |
+ = help: `error` and `lint` have been replaced by `diag`
+
+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)]`
error: cannot find attribute `nonsense` in this scope
--> $DIR/diagnostic-derive.rs:53:3
@@ -392,32 +410,56 @@ LL | #[nonsense(typeck::ambiguous_lifetime_bound, code = "E0123")]
| ^^^^^^^^
error: cannot find attribute `nonsense` in this scope
- --> $DIR/diagnostic-derive.rs:150:7
+ --> $DIR/diagnostic-derive.rs:141:7
|
LL | #[nonsense]
| ^^^^^^^^
+error: cannot find attribute `error` in this scope
+ --> $DIR/diagnostic-derive.rs:558:3
+ |
+LL | #[error(typeck::ambiguous_lifetime_bound, code = "E0123")]
+ | ^^^^^
+
+error: cannot find attribute `warn_` in this scope
+ --> $DIR/diagnostic-derive.rs:565:3
+ |
+LL | #[warn_(typeck::ambiguous_lifetime_bound, code = "E0123")]
+ | ^^^^^ help: a built-in attribute with a similar name exists: `warn`
+
+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`
+
error[E0425]: cannot find value `nonsense` in module `rustc_errors::fluent`
- --> $DIR/diagnostic-derive.rs:66:9
+ --> $DIR/diagnostic-derive.rs:66:8
|
-LL | #[error(nonsense, code = "E0123")]
- | ^^^^^^^^ not found in `rustc_errors::fluent`
+LL | #[diag(nonsense, code = "E0123")]
+ | ^^^^^^^^ not found in `rustc_errors::fluent`
error[E0277]: the trait bound `Hello: IntoDiagnosticArg` is not satisfied
- --> $DIR/diagnostic-derive.rs:340:10
+ --> $DIR/diagnostic-derive.rs:331:10
|
LL | #[derive(SessionDiagnostic)]
| ^^^^^^^^^^^^^^^^^ the trait `IntoDiagnosticArg` is not implemented for `Hello`
|
= help: normalized in stderr
note: required by a bound in `DiagnosticBuilder::<'a, G>::set_arg`
- --> $COMPILER_DIR/rustc_errors/src/diagnostic_builder.rs:539:19
+ --> $COMPILER_DIR/rustc_errors/src/diagnostic_builder.rs:LL:CC
|
LL | arg: impl IntoDiagnosticArg,
| ^^^^^^^^^^^^^^^^^ required by this bound in `DiagnosticBuilder::<'a, G>::set_arg`
= note: this error originates in the derive macro `SessionDiagnostic` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to 48 previous errors
+error: aborting due to 55 previous errors
Some errors have detailed explanations: E0277, E0425.
For more information about an error, try `rustc --explain E0277`.