2020-08-27 20:00:21 +10:00
|
|
|
error: `#[derive(SessionDiagnostic)]` can only be used on structs
|
2022-03-31 08:35:17 +01:00
|
|
|
--> $DIR/session-derive-errors.rs:37:1
|
2020-08-27 20:00:21 +10:00
|
|
|
|
|
2022-03-31 08:35:17 +01:00
|
|
|
LL | / #[error(code = "E0123", slug = "foo")]
|
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-03-31 08:35:17 +01:00
|
|
|
error: `#[error = ...]` is not a valid `SessionDiagnostic` struct attribute
|
|
|
|
|
--> $DIR/session-derive-errors.rs:46:1
|
2020-08-27 20:00:21 +10:00
|
|
|
|
|
2022-03-31 08:35:17 +01:00
|
|
|
LL | #[error = "E0123"]
|
|
|
|
|
| ^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
|
error: `#[nonsense(...)]` is not a valid `SessionDiagnostic` struct attribute
|
|
|
|
|
--> $DIR/session-derive-errors.rs:51:1
|
|
|
|
|
|
|
|
|
|
|
LL | #[nonsense(code = "E0123", slug = "foo")]
|
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
|
error: diagnostic kind not specified
|
|
|
|
|
--> $DIR/session-derive-errors.rs:51:1
|
|
|
|
|
|
|
|
|
|
|
LL | / #[nonsense(code = "E0123", slug = "foo")]
|
|
|
|
|
LL | |
|
|
|
|
|
LL | |
|
|
|
|
|
LL | |
|
|
|
|
|
LL | | struct InvalidStructAttr {}
|
|
|
|
|
| |___________________________^
|
|
|
|
|
|
|
|
|
|
|
= help: use the `#[error(...)]` attribute to create an error
|
|
|
|
|
|
|
|
|
|
error: `#[error("...")]` is not a valid `SessionDiagnostic` struct attribute
|
|
|
|
|
--> $DIR/session-derive-errors.rs:58:9
|
|
|
|
|
|
|
|
|
|
|
LL | #[error("E0123")]
|
|
|
|
|
| ^^^^^^^
|
|
|
|
|
|
|
|
|
|
error: `slug` not specified
|
|
|
|
|
--> $DIR/session-derive-errors.rs:58:1
|
|
|
|
|
|
|
|
|
|
|
LL | / #[error("E0123")]
|
|
|
|
|
LL | |
|
|
|
|
|
LL | |
|
|
|
|
|
LL | | struct InvalidLitNestedAttr {}
|
|
|
|
|
| |______________________________^
|
|
|
|
|
|
|
|
|
|
|
= help: use the `#[error(slug = "...")]` attribute to set this diagnostic's slug
|
|
|
|
|
|
|
|
|
|
error: `#[error(nonsense)]` is not a valid `SessionDiagnostic` struct attribute
|
|
|
|
|
--> $DIR/session-derive-errors.rs:64:9
|
|
|
|
|
|
|
|
|
|
|
LL | #[error(nonsense, code = "E0123", slug = "foo")]
|
|
|
|
|
| ^^^^^^^^
|
|
|
|
|
|
|
|
|
|
error: `#[error(nonsense(...))]` is not a valid `SessionDiagnostic` struct attribute
|
|
|
|
|
--> $DIR/session-derive-errors.rs:69:9
|
|
|
|
|
|
|
|
|
|
|
LL | #[error(nonsense("foo"), code = "E0123", slug = "foo")]
|
|
|
|
|
| ^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
|
error: `#[error(nonsense = ...)]` is not a valid `SessionDiagnostic` struct attribute
|
|
|
|
|
--> $DIR/session-derive-errors.rs:74:9
|
|
|
|
|
|
|
|
|
|
|
LL | #[error(nonsense = "...", code = "E0123", slug = "foo")]
|
|
|
|
|
| ^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
|
error: `#[error(nonsense = ...)]` is not a valid `SessionDiagnostic` struct attribute
|
|
|
|
|
--> $DIR/session-derive-errors.rs:79:9
|
|
|
|
|
|
|
|
|
|
|
LL | #[error(nonsense = 4, code = "E0123", slug = "foo")]
|
|
|
|
|
| ^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
|
|
= help: value must be a string
|
2020-08-27 20:00:21 +10:00
|
|
|
|
2022-03-30 10:04:03 +01:00
|
|
|
error: `#[suggestion = ...]` is not a valid `SessionDiagnostic` field attribute
|
2022-03-31 08:35:17 +01:00
|
|
|
--> $DIR/session-derive-errors.rs:86:5
|
2020-08-27 20:00:21 +10:00
|
|
|
|
|
|
|
|
|
LL | #[suggestion = "this is the wrong kind of attribute"]
|
2020-11-18 11:18:40 +01:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2020-08-27 20:00:21 +10:00
|
|
|
|
|
|
|
|
error: `error` specified multiple times
|
2022-03-31 08:35:17 +01:00
|
|
|
--> $DIR/session-derive-errors.rs:93:1
|
|
|
|
|
|
|
|
|
|
|
LL | #[error(code = "E0456", slug = "bar")]
|
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
|
|
note: previously specified here
|
|
|
|
|
--> $DIR/session-derive-errors.rs:92:1
|
2020-08-27 20:00:21 +10:00
|
|
|
|
|
2022-03-31 08:35:17 +01:00
|
|
|
LL | #[error(code = "E0123", slug = "foo")]
|
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2020-08-27 20:00:21 +10:00
|
|
|
|
2022-03-31 08:35:17 +01:00
|
|
|
error: `warning` specified when `error` was already specified
|
|
|
|
|
--> $DIR/session-derive-errors.rs:98:1
|
2020-08-27 20:00:21 +10:00
|
|
|
|
|
2022-03-31 08:35:17 +01:00
|
|
|
LL | #[warning(code = "E0293", slug = "bar")]
|
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
|
|
note: previously specified here
|
|
|
|
|
--> $DIR/session-derive-errors.rs:97:1
|
|
|
|
|
|
|
|
|
|
|
LL | #[error(code = "E0123", slug = "foo")]
|
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
|
error: `code` specified multiple times
|
|
|
|
|
--> $DIR/session-derive-errors.rs:103:32
|
|
|
|
|
|
|
|
|
|
|
LL | #[error(code = "E0456", code = "E0457", slug = "bar")]
|
|
|
|
|
| ^^^^^^^
|
|
|
|
|
|
|
|
|
|
|
note: previously specified here
|
|
|
|
|
--> $DIR/session-derive-errors.rs:103:16
|
|
|
|
|
|
|
|
|
|
|
LL | #[error(code = "E0456", code = "E0457", slug = "bar")]
|
|
|
|
|
| ^^^^^^^
|
|
|
|
|
|
|
|
|
|
error: `slug` specified multiple times
|
|
|
|
|
--> $DIR/session-derive-errors.rs:107:46
|
|
|
|
|
|
|
|
|
|
|
LL | #[error(code = "E0456", slug = "foo", slug = "bar")]
|
|
|
|
|
| ^^^^^
|
|
|
|
|
|
|
|
|
|
|
note: previously specified here
|
|
|
|
|
--> $DIR/session-derive-errors.rs:107:32
|
|
|
|
|
|
|
|
|
|
|
LL | #[error(code = "E0456", slug = "foo", slug = "bar")]
|
|
|
|
|
| ^^^^^
|
|
|
|
|
|
|
|
|
|
error: diagnostic kind not specified
|
|
|
|
|
--> $DIR/session-derive-errors.rs:111:1
|
|
|
|
|
|
|
|
|
|
|
LL | struct KindNotProvided {}
|
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
|
|
= help: use the `#[error(...)]` attribute to create an error
|
|
|
|
|
|
|
|
|
|
error: `slug` not specified
|
|
|
|
|
--> $DIR/session-derive-errors.rs:114:1
|
|
|
|
|
|
|
|
|
|
|
LL | / #[error(code = "E0456")]
|
|
|
|
|
LL | | struct SlugNotProvided {}
|
|
|
|
|
| |_________________________^
|
|
|
|
|
|
|
|
|
|
|
= help: use the `#[error(slug = "...")]` attribute to set this diagnostic's slug
|
2020-08-27 20:00:21 +10:00
|
|
|
|
2022-03-31 08:50:45 +01:00
|
|
|
error: the `#[primary_span]` attribute can only be applied to fields of type `Span`
|
2022-03-31 08:35:17 +01:00
|
|
|
--> $DIR/session-derive-errors.rs:124:5
|
|
|
|
|
|
|
2022-03-31 08:50:45 +01:00
|
|
|
LL | #[primary_span]
|
|
|
|
|
| ^^^^^^^^^^^^^^^
|
2022-03-31 08:35:17 +01:00
|
|
|
|
|
|
|
|
error: `#[nonsense]` is not a valid `SessionDiagnostic` field attribute
|
|
|
|
|
--> $DIR/session-derive-errors.rs:132:5
|
2020-08-27 20:00:21 +10:00
|
|
|
|
|
2022-03-31 08:35:17 +01:00
|
|
|
LL | #[nonsense]
|
|
|
|
|
| ^^^^^^^^^^^
|
2020-08-27 20:00:21 +10:00
|
|
|
|
2022-03-31 08:35:17 +01:00
|
|
|
error: the `#[label = ...]` attribute can only be applied to fields of type `Span`
|
|
|
|
|
--> $DIR/session-derive-errors.rs:149:5
|
2020-08-27 20:00:21 +10:00
|
|
|
|
|
2022-03-31 10:24:46 +01:00
|
|
|
LL | #[label = "bar"]
|
|
|
|
|
| ^^^^^^^^^^^^^^^^
|
2020-08-27 20:00:21 +10:00
|
|
|
|
|
|
|
|
error: `name` doesn't refer to a field on this type
|
2022-03-31 10:24:46 +01:00
|
|
|
--> $DIR/session-derive-errors.rs:157:52
|
2020-08-27 20:00:21 +10:00
|
|
|
|
|
2022-03-31 10:24:46 +01:00
|
|
|
LL | #[suggestion(message = "This is a suggestion", code = "{name}")]
|
|
|
|
|
| ^^^^^^^^^^^^^^^
|
2020-08-27 20:00:21 +10:00
|
|
|
|
|
|
|
|
error: invalid format string: expected `'}'` but string was terminated
|
2022-03-31 10:24:46 +01:00
|
|
|
--> $DIR/session-derive-errors.rs:162: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-03-31 10:24:46 +01:00
|
|
|
--> $DIR/session-derive-errors.rs:172: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-03-31 08:35:17 +01:00
|
|
|
error: the `#[label = ...]` attribute can only be applied to fields of type `Span`
|
|
|
|
|
--> $DIR/session-derive-errors.rs:192:5
|
2020-08-27 20:00:21 +10:00
|
|
|
|
|
2022-03-31 10:24:46 +01:00
|
|
|
LL | #[label = "bar"]
|
|
|
|
|
| ^^^^^^^^^^^^^^^^
|
2020-08-27 20:00:21 +10:00
|
|
|
|
|
|
|
|
error: `nonsense` is not a valid key for `#[suggestion(...)]`
|
2022-03-31 08:35:17 +01:00
|
|
|
--> $DIR/session-derive-errors.rs:217:18
|
2020-08-27 20:00:21 +10:00
|
|
|
|
|
|
|
|
|
LL | #[suggestion(nonsense = "This is nonsense")]
|
2020-11-18 11:18:40 +01:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2020-08-27 20:00:21 +10:00
|
|
|
|
|
|
|
|
error: `msg` is not a valid key for `#[suggestion(...)]`
|
2022-03-31 08:35:17 +01:00
|
|
|
--> $DIR/session-derive-errors.rs:225:18
|
2020-08-27 20:00:21 +10:00
|
|
|
|
|
|
|
|
|
LL | #[suggestion(msg = "This is a suggestion")]
|
2020-11-18 11:18:40 +01:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2020-08-27 20:00:21 +10:00
|
|
|
|
|
|
|
|
error: missing suggestion message
|
2022-03-31 08:35:17 +01:00
|
|
|
--> $DIR/session-derive-errors.rs:233:7
|
2020-08-27 20:00:21 +10:00
|
|
|
|
|
|
|
|
|
LL | #[suggestion(code = "This is suggested code")]
|
2020-11-18 11:18:40 +01:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2020-08-27 20:00:21 +10:00
|
|
|
|
|
2022-03-30 10:04:03 +01:00
|
|
|
= help: provide a suggestion message using `#[suggestion(message = "...")]`
|
2020-08-27 20:00:21 +10:00
|
|
|
|
|
|
|
|
error: wrong field type for suggestion
|
2022-03-31 08:35:17 +01:00
|
|
|
--> $DIR/session-derive-errors.rs:248:5
|
2020-08-27 20:00:21 +10:00
|
|
|
|
|
2020-11-18 11:18:40 +01:00
|
|
|
LL | / #[suggestion(message = "This is a message", code = "This is suggested code")]
|
|
|
|
|
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-03-31 08:35:17 +01:00
|
|
|
--> $DIR/session-derive-errors.rs:263:5
|
2020-08-27 20:00:21 +10:00
|
|
|
|
|
2020-11-18 11:18:40 +01:00
|
|
|
LL | / #[suggestion(message = "This is a message", code = "This is suggested code")]
|
|
|
|
|
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-03-31 08:35:17 +01:00
|
|
|
--> $DIR/session-derive-errors.rs:271:5
|
2020-08-27 20:00:21 +10:00
|
|
|
|
|
2020-11-18 11:18:40 +01:00
|
|
|
LL | / #[suggestion(message = "This is a message", code = "This is suggested code")]
|
|
|
|
|
LL | |
|
|
|
|
|
LL | | suggestion: (Applicability, Applicability, Span),
|
|
|
|
|
| |____________________________________________________^
|
2020-08-27 20:00:21 +10:00
|
|
|
|
|
|
|
|
error: invalid annotation list `#[label(...)]`
|
2022-03-31 08:35:17 +01:00
|
|
|
--> $DIR/session-derive-errors.rs:279:7
|
2020-08-27 20:00:21 +10:00
|
|
|
|
|
2022-03-31 10:24:46 +01:00
|
|
|
LL | #[label("bar")]
|
|
|
|
|
| ^^^^^^^^^^^^
|
2020-08-27 20:00:21 +10:00
|
|
|
|
2022-03-31 12:10:00 +01:00
|
|
|
error: `#[help]` must come after `#[error(..)]` or `#[warn(..)]`
|
|
|
|
|
--> $DIR/session-derive-errors.rs:400:1
|
|
|
|
|
|
|
|
|
|
|
LL | #[help]
|
|
|
|
|
| ^^^^^^^
|
|
|
|
|
|
|
|
|
|
error: `#[help = ...]` must come after `#[error(..)]` or `#[warn(..)]`
|
|
|
|
|
--> $DIR/session-derive-errors.rs:408:1
|
|
|
|
|
|
|
|
|
|
|
LL | #[help = "bar"]
|
|
|
|
|
| ^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
|
error: `#[note]` must come after `#[error(..)]` or `#[warn(..)]`
|
|
|
|
|
--> $DIR/session-derive-errors.rs:416:1
|
|
|
|
|
|
|
|
|
|
|
LL | #[note]
|
|
|
|
|
| ^^^^^^^
|
|
|
|
|
|
|
|
|
|
error: `#[note = ...]` must come after `#[error(..)]` or `#[warn(..)]`
|
|
|
|
|
--> $DIR/session-derive-errors.rs:424:1
|
|
|
|
|
|
|
|
|
|
|
LL | #[note = "bar"]
|
|
|
|
|
| ^^^^^^^^^^^^^^^
|
|
|
|
|
|
2022-03-31 08:35:17 +01:00
|
|
|
error: cannot find attribute `nonsense` in this scope
|
|
|
|
|
--> $DIR/session-derive-errors.rs:51:3
|
|
|
|
|
|
|
|
|
|
|
LL | #[nonsense(code = "E0123", slug = "foo")]
|
|
|
|
|
| ^^^^^^^^
|
|
|
|
|
|
|
|
|
|
error: cannot find attribute `nonsense` in this scope
|
|
|
|
|
--> $DIR/session-derive-errors.rs:132:7
|
|
|
|
|
|
|
|
|
|
|
LL | #[nonsense]
|
|
|
|
|
| ^^^^^^^^
|
|
|
|
|
|
2022-03-31 09:02:31 +01:00
|
|
|
error[E0599]: no method named `into_diagnostic_arg` found for struct `Hello` in the current scope
|
2022-03-31 10:24:46 +01:00
|
|
|
--> $DIR/session-derive-errors.rs:323:10
|
2022-03-31 09:02:31 +01:00
|
|
|
|
|
|
|
|
|
LL | struct Hello {}
|
|
|
|
|
| ------------ method `into_diagnostic_arg` not found for this
|
|
|
|
|
...
|
|
|
|
|
LL | #[derive(SessionDiagnostic)]
|
|
|
|
|
| ^^^^^^^^^^^^^^^^^ method not found in `Hello`
|
|
|
|
|
|
|
|
|
|
|
= note: this error originates in the derive macro `SessionDiagnostic` (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
|
|
|
|
2022-03-31 12:10:00 +01:00
|
|
|
error: aborting due to 38 previous errors
|
2020-08-27 20:00:21 +10:00
|
|
|
|
2022-03-31 09:02:31 +01:00
|
|
|
For more information about this error, try `rustc --explain E0599`.
|