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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

351 lines
11 KiB
Plaintext
Raw Normal View History

error: `#[derive(SessionDiagnostic)]` can only be used on structs
--> $DIR/diagnostic-derive.rs:37:1
|
LL | / #[error(code = "E0123", slug = "foo")]
LL | |
LL | | enum SessionDiagnosticOnEnum {
LL | | Foo,
LL | | Bar,
LL | | }
| |_^
error: `#[error = ...]` is not a valid attribute
--> $DIR/diagnostic-derive.rs:46:1
|
LL | #[error = "E0123"]
| ^^^^^^^^^^^^^^^^^^
error: `#[nonsense(...)]` is not a valid attribute
--> $DIR/diagnostic-derive.rs:51:1
|
LL | #[nonsense(code = "E0123", slug = "foo")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: only `error` and `warning` are valid attributes
error: diagnostic kind not specified
--> $DIR/diagnostic-derive.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 attribute
--> $DIR/diagnostic-derive.rs:58:9
|
LL | #[error("E0123")]
| ^^^^^^^
error: `slug` not specified
--> $DIR/diagnostic-derive.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 attribute
--> $DIR/diagnostic-derive.rs:64:9
|
LL | #[error(nonsense, code = "E0123", slug = "foo")]
| ^^^^^^^^
error: `#[error(nonsense(...))]` is not a valid attribute
--> $DIR/diagnostic-derive.rs:69:9
|
LL | #[error(nonsense("foo"), code = "E0123", slug = "foo")]
| ^^^^^^^^^^^^^^^
error: `#[error(nonsense = ...)]` is not a valid attribute
--> $DIR/diagnostic-derive.rs:74:9
|
LL | #[error(nonsense = "...", code = "E0123", slug = "foo")]
| ^^^^^^^^^^^^^^^^
|
= help: only `slug` and `code` are valid nested attributes
error: `#[error(nonsense = ...)]` is not a valid attribute
--> $DIR/diagnostic-derive.rs:79:9
|
LL | #[error(nonsense = 4, code = "E0123", slug = "foo")]
| ^^^^^^^^^^^^
error: `#[suggestion = ...]` is not a valid attribute
--> $DIR/diagnostic-derive.rs:86:5
|
LL | #[suggestion = "bar"]
| ^^^^^^^^^^^^^^^^^^^^^
|
= help: only `label`, `note` and `help` are valid field attributes
error: specified multiple times
--> $DIR/diagnostic-derive.rs:93:1
|
LL | #[error(code = "E0456", slug = "bar")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: previously specified here
--> $DIR/diagnostic-derive.rs:92:1
|
LL | #[error(code = "E0123", slug = "foo")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: specified multiple times
--> $DIR/diagnostic-derive.rs:93:16
|
LL | #[error(code = "E0456", slug = "bar")]
| ^^^^^^^
|
note: previously specified here
--> $DIR/diagnostic-derive.rs:92:16
|
LL | #[error(code = "E0123", slug = "foo")]
| ^^^^^^^
error: specified multiple times
--> $DIR/diagnostic-derive.rs:93:32
|
LL | #[error(code = "E0456", slug = "bar")]
| ^^^^^
|
note: previously specified here
--> $DIR/diagnostic-derive.rs:92:32
|
LL | #[error(code = "E0123", slug = "foo")]
| ^^^^^
error: specified multiple times
--> $DIR/diagnostic-derive.rs:101:1
|
LL | #[warning(code = "E0293", slug = "bar")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: previously specified here
--> $DIR/diagnostic-derive.rs:100:1
|
LL | #[error(code = "E0123", slug = "foo")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: specified multiple times
--> $DIR/diagnostic-derive.rs:101:18
|
LL | #[warning(code = "E0293", slug = "bar")]
| ^^^^^^^
|
note: previously specified here
--> $DIR/diagnostic-derive.rs:100:16
|
LL | #[error(code = "E0123", slug = "foo")]
| ^^^^^^^
error: specified multiple times
--> $DIR/diagnostic-derive.rs:101:34
|
LL | #[warning(code = "E0293", slug = "bar")]
| ^^^^^
|
note: previously specified here
--> $DIR/diagnostic-derive.rs:100:32
|
LL | #[error(code = "E0123", slug = "foo")]
| ^^^^^
error: specified multiple times
--> $DIR/diagnostic-derive.rs:108:32
|
LL | #[error(code = "E0456", code = "E0457", slug = "bar")]
| ^^^^^^^
|
note: previously specified here
--> $DIR/diagnostic-derive.rs:108:16
|
LL | #[error(code = "E0456", code = "E0457", slug = "bar")]
| ^^^^^^^
error: specified multiple times
--> $DIR/diagnostic-derive.rs:113:46
|
LL | #[error(code = "E0456", slug = "foo", slug = "bar")]
| ^^^^^
|
note: previously specified here
--> $DIR/diagnostic-derive.rs:113:32
|
LL | #[error(code = "E0456", slug = "foo", slug = "bar")]
| ^^^^^
error: diagnostic kind not specified
--> $DIR/diagnostic-derive.rs:118:1
|
LL | struct KindNotProvided {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: use the `#[error(...)]` attribute to create an error
error: `slug` not specified
--> $DIR/diagnostic-derive.rs:121:1
|
LL | / #[error(code = "E0456")]
LL | | struct SlugNotProvided {}
| |_________________________^
|
= help: use the `#[error(slug = "...")]` attribute to set this diagnostic's slug
error: the `#[primary_span]` attribute can only be applied to fields of type `Span`
--> $DIR/diagnostic-derive.rs:131:5
|
LL | #[primary_span]
| ^^^^^^^^^^^^^^^
error: `#[nonsense]` is not a valid attribute
--> $DIR/diagnostic-derive.rs:139:5
|
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`
--> $DIR/diagnostic-derive.rs:156:5
|
LL | #[label = "bar"]
| ^^^^^^^^^^^^^^^^
error: `name` doesn't refer to a field on this type
--> $DIR/diagnostic-derive.rs:164:42
|
LL | #[suggestion(message = "bar", code = "{name}")]
| ^^^^^^^^
error: invalid format string: expected `'}'` but string was terminated
--> $DIR/diagnostic-derive.rs:169:16
|
LL | #[derive(SessionDiagnostic)]
| - ^ 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/diagnostic-derive.rs:179:15
|
LL | #[derive(SessionDiagnostic)]
| ^ 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/diagnostic-derive.rs:199:5
|
LL | #[label = "bar"]
| ^^^^^^^^^^^^^^^^
error: `#[suggestion(nonsense = ...)]` is not a valid attribute
--> $DIR/diagnostic-derive.rs:224:18
|
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:232:18
|
LL | #[suggestion(msg = "bar")]
| ^^^^^^^^^^^
|
= help: only `message`, `code` and `applicability` are valid field attributes
error: wrong field type for suggestion
--> $DIR/diagnostic-derive.rs:254:5
|
LL | / #[suggestion(message = "bar", 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/diagnostic-derive.rs:269:5
|
LL | / #[suggestion(message = "bar", code = "This is suggested code")]
LL | |
LL | | suggestion: (Span, Span, Applicability),
| |___________________________________________^
error: type of field annotated with `#[suggestion(...)]` contains more than one Applicability
--> $DIR/diagnostic-derive.rs:277:5
|
LL | / #[suggestion(message = "bar", code = "This is suggested code")]
LL | |
LL | | suggestion: (Applicability, Applicability, Span),
| |____________________________________________________^
error: `#[label(...)]` is not a valid attribute
--> $DIR/diagnostic-derive.rs:285:5
|
LL | #[label("bar")]
| ^^^^^^^^^^^^^^^
|
= help: only `suggestion{,_short,_hidden,_verbose}` are valid field attributes
error: applicability cannot be set in both the field and attribute
--> $DIR/diagnostic-derive.rs:436:49
|
LL | #[suggestion(message = "bar", code = "...", applicability = "maybe-incorrect")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: invalid applicability
--> $DIR/diagnostic-derive.rs:444:49
|
LL | #[suggestion(message = "bar", code = "...", applicability = "batman")]
| ^^^^^^^^^^^^^^^^^^^^^^^^
error: cannot find attribute `nonsense` in this scope
--> $DIR/diagnostic-derive.rs:51:3
|
LL | #[nonsense(code = "E0123", slug = "foo")]
| ^^^^^^^^
error: cannot find attribute `nonsense` in this scope
--> $DIR/diagnostic-derive.rs:139:7
|
LL | #[nonsense]
| ^^^^^^^^
error[E0277]: the trait bound `Hello: IntoDiagnosticArg` is not satisfied
--> $DIR/diagnostic-derive.rs:329:10
|
LL | #[derive(SessionDiagnostic)]
| ^^^^^^^^^^^^^^^^^ the trait `IntoDiagnosticArg` is not implemented for `Hello`
|
= help: the following other types implement trait `IntoDiagnosticArg`:
&'a str
Ident
String
Symbol
rustc_middle::ty::Ty<'tcx>
usize
note: required by a bound in `DiagnosticBuilder::<'a, G>::set_arg`
--> $COMPILER_DIR/rustc_errors/src/diagnostic_builder.rs:538:19
|
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 39 previous errors
For more information about this error, try `rustc --explain E0277`.