rust/src/test/ui-fulldeps/session-derive-errors.stderr

279 lines
9.0 KiB
Plaintext
Raw Normal View History

error: `#[derive(SessionDiagnostic)]` can only be used on structs
--> $DIR/session-derive-errors.rs:37:1
|
LL | / #[error(code = "E0123", slug = "foo")]
LL | |
LL | | enum SessionDiagnosticOnEnum {
LL | | Foo,
LL | | Bar,
LL | | }
| |_^
error: `#[error = ...]` is not a valid `SessionDiagnostic` struct attribute
--> $DIR/session-derive-errors.rs:46:1
|
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
error: `#[suggestion = ...]` is not a valid `SessionDiagnostic` field attribute
--> $DIR/session-derive-errors.rs:86:5
|
LL | #[suggestion = "this is the wrong kind of attribute"]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: `error` specified multiple times
--> $DIR/session-derive-errors.rs:93:1
|
LL | #[error(code = "E0456", slug = "bar")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: previously specified here
--> $DIR/session-derive-errors.rs:92:1
|
LL | #[error(code = "E0123", slug = "foo")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: `warning` specified when `error` was already specified
--> $DIR/session-derive-errors.rs:98:1
|
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
error: `code` not specified
--> $DIR/session-derive-errors.rs:118:1
|
LL | / #[error(slug = "foo")]
LL | | struct CodeNotProvided {}
| |_________________________^
|
= help: use the `#[error(code = "...")]` attribute to set this diagnostic's error code
error: the `#[primary_span]` attribute can only be applied to fields of type `Span`
--> $DIR/session-derive-errors.rs:124:5
|
LL | #[primary_span]
| ^^^^^^^^^^^^^^^
error: `#[nonsense]` is not a valid `SessionDiagnostic` field attribute
--> $DIR/session-derive-errors.rs:132:5
|
LL | #[nonsense]
| ^^^^^^^^^^^
error: the `#[label = ...]` attribute can only be applied to fields of type `Span`
--> $DIR/session-derive-errors.rs:149:5
|
LL | #[label = "this message is applied to a String field"]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: `name` doesn't refer to a field on this type
--> $DIR/session-derive-errors.rs:157:5
|
LL | #[label = "This error has a field, and references {name}"]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: invalid format string: expected `'}'` but string was terminated
--> $DIR/session-derive-errors.rs:163:20
|
LL | #[derive(SessionDiagnostic)]
| ----------------- in this derive macro expansion
LL | #[error(code = "E0123", slug = "foo")]
| - ^ expected `'}'` in format string
| |
| because of this opening brace
|
= note: if you intended to print `{`, you can escape it using `{{`
= 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/session-derive-errors.rs:173:20
|
LL | #[derive(SessionDiagnostic)]
| ----------------- in this derive macro expansion
LL | #[error(code = "E0123", slug = "foo")]
| ^ unmatched `}` in format string
|
= note: if you intended to print `}`, you can escape it using `}}`
= 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`
--> $DIR/session-derive-errors.rs:192:5
|
LL | #[label = "See here"]
| ^^^^^^^^^^^^^^^^^^^^^
error: `nonsense` is not a valid key for `#[suggestion(...)]`
--> $DIR/session-derive-errors.rs:217:18
|
LL | #[suggestion(nonsense = "This is nonsense")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: `msg` is not a valid key for `#[suggestion(...)]`
--> $DIR/session-derive-errors.rs:225:18
|
LL | #[suggestion(msg = "This is a suggestion")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: missing suggestion message
--> $DIR/session-derive-errors.rs:233:7
|
LL | #[suggestion(code = "This is suggested code")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: provide a suggestion message using `#[suggestion(message = "...")]`
error: wrong field type for suggestion
--> $DIR/session-derive-errors.rs:248:5
|
LL | / #[suggestion(message = "This is a message", code = "This is suggested code")]
LL | |
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/session-derive-errors.rs:263:5
|
LL | / #[suggestion(message = "This is a message", code = "This is suggested code")]
LL | |
LL | | suggestion: (Span, Span, Applicability),
| |___________________________________________^
error: type of field annotated with `#[suggestion(...)]` contains more than one Applicability
--> $DIR/session-derive-errors.rs:271:5
|
LL | / #[suggestion(message = "This is a message", code = "This is suggested code")]
LL | |
LL | | suggestion: (Applicability, Applicability, Span),
| |____________________________________________________^
error: invalid annotation list `#[label(...)]`
--> $DIR/session-derive-errors.rs:279:7
|
LL | #[label("wrong kind of annotation for label")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
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]
| ^^^^^^^^
error: aborting due to 34 previous errors