2020-08-27 20:00:21 +10:00
|
|
|
error: `#[derive(SessionDiagnostic)]` can only be used on structs
|
2022-06-29 09:21:44 +01:00
|
|
|
--> $DIR/diagnostic-derive.rs:39:1
|
2020-08-27 20:00:21 +10:00
|
|
|
|
|
2022-06-23 14:51:44 +01:00
|
|
|
LL | / #[error(typeck::ambiguous_lifetime_bound, code = "E0123")]
|
2020-11-18 11:18:40 +01:00
|
|
|
LL | |
|
|
|
|
LL | | enum SessionDiagnosticOnEnum {
|
|
|
|
LL | | Foo,
|
|
|
|
LL | | Bar,
|
|
|
|
LL | | }
|
|
|
|
| |_^
|
2020-08-27 20:00:21 +10:00
|
|
|
|
2022-04-27 04:06:13 +01:00
|
|
|
error: `#[error = ...]` is not a valid attribute
|
2022-06-29 09:21:44 +01:00
|
|
|
--> $DIR/diagnostic-derive.rs:48:1
|
2020-08-27 20:00:21 +10:00
|
|
|
|
|
2022-03-31 08:35:17 +01:00
|
|
|
LL | #[error = "E0123"]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^
|
|
|
|
|
2022-04-27 04:06:13 +01:00
|
|
|
error: `#[nonsense(...)]` is not a valid attribute
|
2022-06-29 09:21:44 +01:00
|
|
|
--> $DIR/diagnostic-derive.rs:53:1
|
2022-03-31 08:35:17 +01:00
|
|
|
|
|
2022-06-23 14:51:44 +01:00
|
|
|
LL | #[nonsense(typeck::ambiguous_lifetime_bound, code = "E0123")]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2022-04-27 04:06:13 +01:00
|
|
|
|
|
2022-08-19 15:02:10 +02:00
|
|
|
= help: only `diag`, `help`, `note` and `warn_` are valid attributes
|
2022-03-31 08:35:17 +01:00
|
|
|
|
2022-08-19 15:02:10 +02:00
|
|
|
error: diagnostic slug not specified
|
2022-06-29 09:21:44 +01:00
|
|
|
--> $DIR/diagnostic-derive.rs:53:1
|
2022-03-31 08:35:17 +01:00
|
|
|
|
|
2022-06-23 14:51:44 +01:00
|
|
|
LL | / #[nonsense(typeck::ambiguous_lifetime_bound, code = "E0123")]
|
2022-03-31 08:35:17 +01:00
|
|
|
LL | |
|
|
|
|
LL | |
|
|
|
|
LL | |
|
|
|
|
LL | | struct InvalidStructAttr {}
|
|
|
|
| |___________________________^
|
|
|
|
|
|
2022-08-19 15:02:10 +02:00
|
|
|
= help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(typeck::example_error)]`
|
2022-03-31 08:35:17 +01:00
|
|
|
|
2022-04-27 04:06:13 +01:00
|
|
|
error: `#[error("...")]` is not a valid attribute
|
2022-06-29 09:21:44 +01:00
|
|
|
--> $DIR/diagnostic-derive.rs:60:9
|
2022-03-31 08:35:17 +01:00
|
|
|
|
|
|
|
|
LL | #[error("E0123")]
|
|
|
|
| ^^^^^^^
|
2022-06-23 14:51:44 +01:00
|
|
|
|
|
|
|
|
= help: first argument of the attribute should be the diagnostic slug
|
2022-03-31 08:35:17 +01:00
|
|
|
|
2022-06-23 14:51:44 +01:00
|
|
|
error: diagnostic slug not specified
|
2022-06-29 09:21:44 +01:00
|
|
|
--> $DIR/diagnostic-derive.rs:60:1
|
2022-03-31 08:35:17 +01:00
|
|
|
|
|
|
|
|
LL | / #[error("E0123")]
|
|
|
|
LL | |
|
|
|
|
LL | |
|
|
|
|
LL | | struct InvalidLitNestedAttr {}
|
|
|
|
| |______________________________^
|
|
|
|
|
|
2022-08-19 15:02:10 +02:00
|
|
|
= help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(typeck::example_error)]`
|
2022-03-31 08:35:17 +01:00
|
|
|
|
2022-04-27 04:06:13 +01:00
|
|
|
error: `#[error(nonsense(...))]` is not a valid attribute
|
2022-06-29 09:21:44 +01:00
|
|
|
--> $DIR/diagnostic-derive.rs:71:9
|
2022-03-31 08:35:17 +01:00
|
|
|
|
|
|
|
|
LL | #[error(nonsense("foo"), code = "E0123", slug = "foo")]
|
|
|
|
| ^^^^^^^^^^^^^^^
|
2022-06-23 14:51:44 +01:00
|
|
|
|
|
|
|
|
= help: first argument of the attribute should be the diagnostic slug
|
|
|
|
|
|
|
|
error: diagnostic slug not specified
|
2022-06-29 09:21:44 +01:00
|
|
|
--> $DIR/diagnostic-derive.rs:71:1
|
2022-06-23 14:51:44 +01:00
|
|
|
|
|
|
|
|
LL | / #[error(nonsense("foo"), code = "E0123", slug = "foo")]
|
|
|
|
LL | |
|
|
|
|
LL | |
|
|
|
|
LL | | struct InvalidNestedStructAttr1 {}
|
|
|
|
| |__________________________________^
|
|
|
|
|
|
2022-08-19 15:02:10 +02:00
|
|
|
= help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(typeck::example_error)]`
|
2022-03-31 08:35:17 +01:00
|
|
|
|
2022-04-27 04:06:13 +01:00
|
|
|
error: `#[error(nonsense = ...)]` is not a valid attribute
|
2022-06-29 09:21:44 +01:00
|
|
|
--> $DIR/diagnostic-derive.rs:77:9
|
2022-03-31 08:35:17 +01:00
|
|
|
|
|
|
|
|
LL | #[error(nonsense = "...", code = "E0123", slug = "foo")]
|
|
|
|
| ^^^^^^^^^^^^^^^^
|
2022-04-27 04:06:13 +01:00
|
|
|
|
|
2022-06-23 14:51:44 +01:00
|
|
|
= help: first argument of the attribute should be the diagnostic slug
|
|
|
|
|
|
|
|
error: diagnostic slug not specified
|
2022-06-29 09:21:44 +01:00
|
|
|
--> $DIR/diagnostic-derive.rs:77:1
|
2022-06-23 14:51:44 +01:00
|
|
|
|
|
|
|
|
LL | / #[error(nonsense = "...", code = "E0123", slug = "foo")]
|
|
|
|
LL | |
|
|
|
|
LL | |
|
|
|
|
LL | | struct InvalidNestedStructAttr2 {}
|
|
|
|
| |__________________________________^
|
|
|
|
|
|
2022-08-19 15:02:10 +02:00
|
|
|
= help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(typeck::example_error)]`
|
2022-03-31 08:35:17 +01:00
|
|
|
|
2022-04-27 04:06:13 +01:00
|
|
|
error: `#[error(nonsense = ...)]` is not a valid attribute
|
2022-06-29 09:21:44 +01:00
|
|
|
--> $DIR/diagnostic-derive.rs:83:9
|
2022-03-31 08:35:17 +01:00
|
|
|
|
|
|
|
|
LL | #[error(nonsense = 4, code = "E0123", slug = "foo")]
|
|
|
|
| ^^^^^^^^^^^^
|
2022-06-23 14:51:44 +01:00
|
|
|
|
|
|
|
|
= help: first argument of the attribute should be the diagnostic slug
|
2020-08-27 20:00:21 +10:00
|
|
|
|
2022-06-23 14:51:44 +01:00
|
|
|
error: diagnostic slug not specified
|
2022-06-29 09:21:44 +01:00
|
|
|
--> $DIR/diagnostic-derive.rs:83:1
|
2020-08-27 20:00:21 +10:00
|
|
|
|
|
2022-06-23 14:51:44 +01:00
|
|
|
LL | / #[error(nonsense = 4, code = "E0123", slug = "foo")]
|
|
|
|
LL | |
|
|
|
|
LL | |
|
|
|
|
LL | | struct InvalidNestedStructAttr3 {}
|
|
|
|
| |__________________________________^
|
2022-04-27 04:06:13 +01:00
|
|
|
|
|
2022-08-19 15:02:10 +02:00
|
|
|
= help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(typeck::example_error)]`
|
2020-08-27 20:00:21 +10:00
|
|
|
|
2022-06-23 14:51:44 +01:00
|
|
|
error: `#[error(slug = ...)]` is not a valid attribute
|
2022-06-29 09:21:44 +01:00
|
|
|
--> $DIR/diagnostic-derive.rs:89:59
|
2022-03-31 08:35:17 +01:00
|
|
|
|
|
2022-06-23 14:51:44 +01:00
|
|
|
LL | #[error(typeck::ambiguous_lifetime_bound, code = "E0123", slug = "foo")]
|
|
|
|
| ^^^^^^^^^^^^
|
2022-03-31 08:35:17 +01:00
|
|
|
|
|
2022-06-23 14:51:44 +01:00
|
|
|
= help: only `code` is a valid nested attributes following the slug
|
|
|
|
|
|
|
|
error: `#[suggestion = ...]` is not a valid attribute
|
2022-06-29 09:21:44 +01:00
|
|
|
--> $DIR/diagnostic-derive.rs:96:5
|
2020-08-27 20:00:21 +10:00
|
|
|
|
|
2022-06-23 14:51:44 +01:00
|
|
|
LL | #[suggestion = "bar"]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^
|
2020-08-27 20:00:21 +10:00
|
|
|
|
2022-04-27 04:28:21 +01:00
|
|
|
error: specified multiple times
|
2022-06-29 09:21:44 +01:00
|
|
|
--> $DIR/diagnostic-derive.rs:103:1
|
2022-04-27 04:28:21 +01:00
|
|
|
|
|
2022-06-23 14:51:44 +01:00
|
|
|
LL | #[error(typeck::ambiguous_lifetime_bound, code = "E0456")]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2022-04-27 04:28:21 +01:00
|
|
|
|
|
|
|
|
note: previously specified here
|
2022-06-29 09:21:44 +01:00
|
|
|
--> $DIR/diagnostic-derive.rs:102:1
|
2022-04-27 04:28:21 +01:00
|
|
|
|
|
2022-06-23 14:51:44 +01:00
|
|
|
LL | #[error(typeck::ambiguous_lifetime_bound, code = "E0123")]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2022-04-27 04:28:21 +01:00
|
|
|
|
|
|
|
error: specified multiple times
|
2022-06-29 09:21:44 +01:00
|
|
|
--> $DIR/diagnostic-derive.rs:103:50
|
2020-08-27 20:00:21 +10:00
|
|
|
|
|
2022-06-23 14:51:44 +01:00
|
|
|
LL | #[error(typeck::ambiguous_lifetime_bound, code = "E0456")]
|
|
|
|
| ^^^^^^^
|
2022-03-31 08:35:17 +01:00
|
|
|
|
|
|
|
|
note: previously specified here
|
2022-06-29 09:21:44 +01:00
|
|
|
--> $DIR/diagnostic-derive.rs:102:50
|
2022-03-31 08:35:17 +01:00
|
|
|
|
|
2022-06-23 14:51:44 +01:00
|
|
|
LL | #[error(typeck::ambiguous_lifetime_bound, code = "E0123")]
|
|
|
|
| ^^^^^^^
|
2022-03-31 08:35:17 +01:00
|
|
|
|
2022-04-27 04:28:21 +01:00
|
|
|
error: specified multiple times
|
2022-06-29 09:21:44 +01:00
|
|
|
--> $DIR/diagnostic-derive.rs:110:1
|
2022-04-27 04:28:21 +01:00
|
|
|
|
|
2022-06-23 14:51:44 +01:00
|
|
|
LL | #[warning(typeck::ambiguous_lifetime_bound, code = "E0293")]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2022-04-27 04:28:21 +01:00
|
|
|
|
|
|
|
|
note: previously specified here
|
2022-08-19 15:02:10 +02:00
|
|
|
--> $DIR/diagnostic-derive.rs:109:1
|
2022-04-27 04:28:21 +01:00
|
|
|
|
|
2022-06-23 14:51:44 +01:00
|
|
|
LL | #[error(typeck::ambiguous_lifetime_bound, code = "E0123")]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2022-04-27 04:28:21 +01:00
|
|
|
|
|
|
|
error: specified multiple times
|
2022-08-19 15:02:10 +02:00
|
|
|
--> $DIR/diagnostic-derive.rs:110:52
|
2022-03-31 08:35:17 +01:00
|
|
|
|
|
2022-06-23 14:51:44 +01:00
|
|
|
LL | #[warning(typeck::ambiguous_lifetime_bound, code = "E0293")]
|
|
|
|
| ^^^^^^^
|
2022-03-31 08:35:17 +01:00
|
|
|
|
|
|
|
|
note: previously specified here
|
2022-08-19 15:02:10 +02:00
|
|
|
--> $DIR/diagnostic-derive.rs:109:50
|
2022-03-31 08:35:17 +01:00
|
|
|
|
|
2022-06-23 14:51:44 +01:00
|
|
|
LL | #[error(typeck::ambiguous_lifetime_bound, code = "E0123")]
|
|
|
|
| ^^^^^^^
|
2022-03-31 08:35:17 +01:00
|
|
|
|
2022-04-27 04:28:21 +01:00
|
|
|
error: specified multiple times
|
2022-08-19 15:02:10 +02:00
|
|
|
--> $DIR/diagnostic-derive.rs:116:66
|
2022-03-31 08:35:17 +01:00
|
|
|
|
|
2022-06-23 14:51:44 +01:00
|
|
|
LL | #[error(typeck::ambiguous_lifetime_bound, code = "E0456", code = "E0457")]
|
|
|
|
| ^^^^^^^
|
2022-03-31 08:35:17 +01:00
|
|
|
|
|
|
|
|
note: previously specified here
|
2022-08-19 15:02:10 +02:00
|
|
|
--> $DIR/diagnostic-derive.rs:116:50
|
2022-03-31 08:35:17 +01:00
|
|
|
|
|
2022-06-23 14:51:44 +01:00
|
|
|
LL | #[error(typeck::ambiguous_lifetime_bound, code = "E0456", code = "E0457")]
|
|
|
|
| ^^^^^^^
|
|
|
|
|
|
|
|
error: `#[error(typeck::ambiguous_lifetime_bound)]` is not a valid attribute
|
2022-08-19 15:02:10 +02:00
|
|
|
--> $DIR/diagnostic-derive.rs:121:43
|
2022-06-23 14:51:44 +01:00
|
|
|
|
|
|
|
|
LL | #[error(typeck::ambiguous_lifetime_bound, typeck::ambiguous_lifetime_bound, code = "E0456")]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2022-03-31 08:35:17 +01:00
|
|
|
|
2022-08-19 15:02:10 +02:00
|
|
|
error: diagnostic slug not specified
|
|
|
|
--> $DIR/diagnostic-derive.rs:126:1
|
2022-03-31 08:35:17 +01:00
|
|
|
|
|
|
|
|
LL | struct KindNotProvided {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
2022-08-19 15:02:10 +02:00
|
|
|
= help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(typeck::example_error)]`
|
2022-03-31 08:35:17 +01:00
|
|
|
|
2022-06-23 14:51:44 +01:00
|
|
|
error: diagnostic slug not specified
|
2022-08-19 15:02:10 +02:00
|
|
|
--> $DIR/diagnostic-derive.rs:129:1
|
2022-03-31 08:35:17 +01:00
|
|
|
|
|
|
|
|
LL | / #[error(code = "E0456")]
|
2022-06-23 14:51:44 +01:00
|
|
|
LL | |
|
2022-03-31 08:35:17 +01:00
|
|
|
LL | | struct SlugNotProvided {}
|
|
|
|
| |_________________________^
|
|
|
|
|
|
2022-08-19 15:02:10 +02:00
|
|
|
= help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(typeck::example_error)]`
|
2020-08-27 20:00:21 +10:00
|
|
|
|
2022-07-11 17:15:31 +01:00
|
|
|
error: the `#[primary_span]` attribute can only be applied to fields of type `Span` or `MultiSpan`
|
2022-08-19 15:02:10 +02:00
|
|
|
--> $DIR/diagnostic-derive.rs:140:5
|
2022-03-31 08:35:17 +01:00
|
|
|
|
|
2022-03-31 08:50:45 +01:00
|
|
|
LL | #[primary_span]
|
|
|
|
| ^^^^^^^^^^^^^^^
|
2022-03-31 08:35:17 +01:00
|
|
|
|
2022-04-27 04:06:13 +01:00
|
|
|
error: `#[nonsense]` is not a valid attribute
|
2022-08-19 15:02:10 +02:00
|
|
|
--> $DIR/diagnostic-derive.rs:148:5
|
2020-08-27 20:00:21 +10:00
|
|
|
|
|
2022-03-31 08:35:17 +01:00
|
|
|
LL | #[nonsense]
|
|
|
|
| ^^^^^^^^^^^
|
2022-04-27 04:06:13 +01:00
|
|
|
|
|
2022-04-27 05:59:48 +01:00
|
|
|
= help: only `skip_arg`, `primary_span`, `label`, `note`, `help` and `subdiagnostic` are valid field attributes
|
2020-08-27 20:00:21 +10:00
|
|
|
|
2022-07-11 17:15:31 +01:00
|
|
|
error: the `#[label(...)]` attribute can only be applied to fields of type `Span` or `MultiSpan`
|
2022-08-19 15:02:10 +02:00
|
|
|
--> $DIR/diagnostic-derive.rs:165:5
|
2020-08-27 20:00:21 +10:00
|
|
|
|
|
2022-06-23 14:51:44 +01:00
|
|
|
LL | #[label(typeck::label)]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^
|
2020-08-27 20:00:21 +10:00
|
|
|
|
|
|
|
error: `name` doesn't refer to a field on this type
|
2022-08-19 15:02:10 +02:00
|
|
|
--> $DIR/diagnostic-derive.rs:173:45
|
2020-08-27 20:00:21 +10:00
|
|
|
|
|
2022-06-23 14:51:44 +01:00
|
|
|
LL | #[suggestion(typeck::suggestion, code = "{name}")]
|
|
|
|
| ^^^^^^^^
|
2020-08-27 20:00:21 +10:00
|
|
|
|
|
|
|
error: invalid format string: expected `'}'` but string was terminated
|
2022-08-19 15:02:10 +02:00
|
|
|
--> $DIR/diagnostic-derive.rs:178:16
|
2020-08-27 20:00:21 +10:00
|
|
|
|
|
2021-07-17 11:13:50 -07:00
|
|
|
LL | #[derive(SessionDiagnostic)]
|
2022-03-31 10:24:46 +01:00
|
|
|
| - ^ expected `'}'` in format string
|
|
|
|
| |
|
|
|
|
| because of this opening brace
|
2020-08-27 20:00:21 +10:00
|
|
|
|
|
|
|
|
= note: if you intended to print `{`, you can escape it using `{{`
|
2021-02-13 14:52:25 -05:00
|
|
|
= note: this error originates in the derive macro `SessionDiagnostic` (in Nightly builds, run with -Z macro-backtrace for more info)
|
2020-08-27 20:00:21 +10:00
|
|
|
|
|
|
|
error: invalid format string: unmatched `}` found
|
2022-08-19 15:02:10 +02:00
|
|
|
--> $DIR/diagnostic-derive.rs:188:15
|
2020-08-27 20:00:21 +10:00
|
|
|
|
|
2021-07-17 11:13:50 -07:00
|
|
|
LL | #[derive(SessionDiagnostic)]
|
2022-03-31 10:24:46 +01:00
|
|
|
| ^ unmatched `}` in format string
|
2020-08-27 20:00:21 +10:00
|
|
|
|
|
|
|
|
= note: if you intended to print `}`, you can escape it using `}}`
|
2021-02-13 14:52:25 -05:00
|
|
|
= note: this error originates in the derive macro `SessionDiagnostic` (in Nightly builds, run with -Z macro-backtrace for more info)
|
2020-08-27 20:00:21 +10:00
|
|
|
|
2022-07-11 17:15:31 +01:00
|
|
|
error: the `#[label(...)]` attribute can only be applied to fields of type `Span` or `MultiSpan`
|
2022-08-19 15:02:10 +02:00
|
|
|
--> $DIR/diagnostic-derive.rs:208:5
|
2020-08-27 20:00:21 +10:00
|
|
|
|
|
2022-06-23 14:51:44 +01:00
|
|
|
LL | #[label(typeck::label)]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^
|
2020-08-27 20:00:21 +10:00
|
|
|
|
2022-04-27 04:06:13 +01:00
|
|
|
error: `#[suggestion(nonsense = ...)]` is not a valid attribute
|
2022-08-19 15:02:10 +02:00
|
|
|
--> $DIR/diagnostic-derive.rs:233:18
|
2020-08-27 20:00:21 +10:00
|
|
|
|
|
2022-03-31 13:10:13 +01:00
|
|
|
LL | #[suggestion(nonsense = "bar")]
|
|
|
|
| ^^^^^^^^^^^^^^^^
|
2022-04-27 04:06:13 +01:00
|
|
|
|
|
2022-04-27 05:43:36 +01:00
|
|
|
= help: only `message`, `code` and `applicability` are valid field attributes
|
2020-08-27 20:00:21 +10:00
|
|
|
|
2022-04-27 04:06:13 +01:00
|
|
|
error: `#[suggestion(msg = ...)]` is not a valid attribute
|
2022-08-19 15:02:10 +02:00
|
|
|
--> $DIR/diagnostic-derive.rs:241:18
|
2020-08-27 20:00:21 +10:00
|
|
|
|
|
2022-03-31 13:10:13 +01:00
|
|
|
LL | #[suggestion(msg = "bar")]
|
|
|
|
| ^^^^^^^^^^^
|
2022-04-27 04:06:13 +01:00
|
|
|
|
|
2022-04-27 05:43:36 +01:00
|
|
|
= help: only `message`, `code` and `applicability` are valid field attributes
|
2020-08-27 20:00:21 +10:00
|
|
|
|
|
|
|
error: wrong field type for suggestion
|
2022-08-19 15:02:10 +02:00
|
|
|
--> $DIR/diagnostic-derive.rs:263:5
|
2020-08-27 20:00:21 +10:00
|
|
|
|
|
2022-06-23 14:51:44 +01:00
|
|
|
LL | / #[suggestion(typeck::suggestion, code = "This is suggested code")]
|
2020-11-18 11:18:40 +01:00
|
|
|
LL | |
|
|
|
|
LL | | suggestion: Applicability,
|
|
|
|
| |_____________________________^
|
2020-08-27 20:00:21 +10:00
|
|
|
|
|
2022-03-30 10:04:03 +01:00
|
|
|
= help: `#[suggestion(...)]` should be applied to fields of type `Span` or `(Span, Applicability)`
|
2020-08-27 20:00:21 +10:00
|
|
|
|
2022-03-30 10:04:03 +01:00
|
|
|
error: type of field annotated with `#[suggestion(...)]` contains more than one `Span`
|
2022-08-19 15:02:10 +02:00
|
|
|
--> $DIR/diagnostic-derive.rs:278:5
|
2020-08-27 20:00:21 +10:00
|
|
|
|
|
2022-06-23 14:51:44 +01:00
|
|
|
LL | / #[suggestion(typeck::suggestion, code = "This is suggested code")]
|
2020-11-18 11:18:40 +01:00
|
|
|
LL | |
|
|
|
|
LL | | suggestion: (Span, Span, Applicability),
|
|
|
|
| |___________________________________________^
|
2020-08-27 20:00:21 +10:00
|
|
|
|
|
|
|
error: type of field annotated with `#[suggestion(...)]` contains more than one Applicability
|
2022-08-19 15:02:10 +02:00
|
|
|
--> $DIR/diagnostic-derive.rs:286:5
|
2020-08-27 20:00:21 +10:00
|
|
|
|
|
2022-06-23 14:51:44 +01:00
|
|
|
LL | / #[suggestion(typeck::suggestion, code = "This is suggested code")]
|
2020-11-18 11:18:40 +01:00
|
|
|
LL | |
|
|
|
|
LL | | suggestion: (Applicability, Applicability, Span),
|
|
|
|
| |____________________________________________________^
|
2020-08-27 20:00:21 +10:00
|
|
|
|
2022-06-23 14:51:44 +01:00
|
|
|
error: `#[label = ...]` is not a valid attribute
|
2022-08-19 15:02:10 +02:00
|
|
|
--> $DIR/diagnostic-derive.rs:294:5
|
2022-04-27 04:06:13 +01:00
|
|
|
|
|
2022-06-23 14:51:44 +01:00
|
|
|
LL | #[label = "bar"]
|
|
|
|
| ^^^^^^^^^^^^^^^^
|
2020-08-27 20:00:21 +10:00
|
|
|
|
2022-04-27 05:43:36 +01:00
|
|
|
error: applicability cannot be set in both the field and attribute
|
2022-08-19 15:02:10 +02:00
|
|
|
--> $DIR/diagnostic-derive.rs:445:52
|
2022-04-27 05:43:36 +01:00
|
|
|
|
|
2022-06-23 14:51:44 +01:00
|
|
|
LL | #[suggestion(typeck::suggestion, code = "...", applicability = "maybe-incorrect")]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2022-04-27 05:43:36 +01:00
|
|
|
|
|
|
|
error: invalid applicability
|
2022-08-19 15:02:10 +02:00
|
|
|
--> $DIR/diagnostic-derive.rs:453:52
|
2022-06-23 14:51:44 +01:00
|
|
|
|
|
|
|
|
LL | #[suggestion(typeck::suggestion, code = "...", applicability = "batman")]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: `#[label(...)]` is not a valid attribute
|
2022-08-19 15:02:10 +02:00
|
|
|
--> $DIR/diagnostic-derive.rs:516:5
|
2022-06-23 14:51:44 +01:00
|
|
|
|
|
|
|
|
LL | #[label(typeck::label, foo)]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: `#[label(...)]` is not a valid attribute
|
2022-08-19 15:02:10 +02:00
|
|
|
--> $DIR/diagnostic-derive.rs:524:5
|
2022-06-23 14:51:44 +01:00
|
|
|
|
|
|
|
|
LL | #[label(typeck::label, foo = "...")]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: `#[label(...)]` is not a valid attribute
|
2022-08-19 15:02:10 +02:00
|
|
|
--> $DIR/diagnostic-derive.rs:532:5
|
2022-04-27 05:43:36 +01:00
|
|
|
|
|
2022-06-23 14:51:44 +01:00
|
|
|
LL | #[label(typeck::label, foo("..."))]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2022-04-27 05:43:36 +01:00
|
|
|
|
2022-07-11 18:46:24 +01:00
|
|
|
error: only `#[error(..)]` and `#[warning(..)]` are supported
|
2022-08-19 15:02:10 +02:00
|
|
|
--> $DIR/diagnostic-derive.rs:538:1
|
2022-06-30 08:57:45 +01:00
|
|
|
|
|
2022-08-19 15:02:10 +02:00
|
|
|
LL | #[lint(typeck::ambiguous_lifetime_bound)]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2022-06-30 08:57:45 +01:00
|
|
|
|
|
|
|
|
= help: use the `#[error(...)]` attribute to create a error
|
|
|
|
|
|
|
|
error: only `#[lint(..)]` is supported
|
2022-08-19 15:02:10 +02:00
|
|
|
--> $DIR/diagnostic-derive.rs:549:1
|
2022-06-30 08:57:45 +01:00
|
|
|
|
|
2022-08-19 15:02:10 +02:00
|
|
|
LL | #[error(typeck::ambiguous_lifetime_bound)]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2022-06-30 08:57:45 +01:00
|
|
|
|
|
|
|
|
= help: use the `#[lint(...)]` attribute to create a lint
|
|
|
|
|
2022-03-31 08:35:17 +01:00
|
|
|
error: cannot find attribute `nonsense` in this scope
|
2022-06-29 09:21:44 +01:00
|
|
|
--> $DIR/diagnostic-derive.rs:53:3
|
2022-03-31 08:35:17 +01:00
|
|
|
|
|
2022-06-23 14:51:44 +01:00
|
|
|
LL | #[nonsense(typeck::ambiguous_lifetime_bound, code = "E0123")]
|
2022-03-31 08:35:17 +01:00
|
|
|
| ^^^^^^^^
|
|
|
|
|
|
|
|
error: cannot find attribute `nonsense` in this scope
|
2022-08-19 15:02:10 +02:00
|
|
|
--> $DIR/diagnostic-derive.rs:148:7
|
2022-03-31 08:35:17 +01:00
|
|
|
|
|
|
|
|
LL | #[nonsense]
|
|
|
|
| ^^^^^^^^
|
|
|
|
|
2022-06-23 14:51:44 +01:00
|
|
|
error[E0425]: cannot find value `nonsense` in module `rustc_errors::fluent`
|
2022-06-29 09:21:44 +01:00
|
|
|
--> $DIR/diagnostic-derive.rs:66:9
|
2022-06-23 14:51:44 +01:00
|
|
|
|
|
|
|
|
LL | #[error(nonsense, code = "E0123")]
|
|
|
|
| ^^^^^^^^ not found in `rustc_errors::fluent`
|
|
|
|
|
2022-05-07 07:26:03 +01:00
|
|
|
error[E0277]: the trait bound `Hello: IntoDiagnosticArg` is not satisfied
|
2022-08-19 15:02:10 +02:00
|
|
|
--> $DIR/diagnostic-derive.rs:338:10
|
2022-03-31 09:02:31 +01:00
|
|
|
|
|
|
|
|
LL | #[derive(SessionDiagnostic)]
|
2022-05-07 07:26:03 +01:00
|
|
|
| ^^^^^^^^^^^^^^^^^ the trait `IntoDiagnosticArg` is not implemented for `Hello`
|
|
|
|
|
|
2022-06-29 09:21:44 +01:00
|
|
|
= help: normalized in stderr
|
2022-05-07 07:26:03 +01:00
|
|
|
note: required by a bound in `DiagnosticBuilder::<'a, G>::set_arg`
|
2022-08-19 14:47:45 +02:00
|
|
|
--> $COMPILER_DIR/rustc_errors/src/diagnostic_builder.rs:569:19
|
2022-05-07 07:26:03 +01:00
|
|
|
|
|
|
|
|
LL | arg: impl IntoDiagnosticArg,
|
|
|
|
| ^^^^^^^^^^^^^^^^^ required by this bound in `DiagnosticBuilder::<'a, G>::set_arg`
|
2022-03-31 09:02:31 +01:00
|
|
|
= note: this error originates in the derive macro `SessionDiagnostic` (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
|
|
|
2022-08-19 15:02:10 +02:00
|
|
|
error: aborting due to 46 previous errors
|
2020-08-27 20:00:21 +10:00
|
|
|
|
2022-06-23 14:51:44 +01:00
|
|
|
Some errors have detailed explanations: E0277, E0425.
|
|
|
|
For more information about an error, try `rustc --explain E0277`.
|