d6af60266e
Nils had an excellent idea the other day: the same way that rustdoc is able to load `rustc_driver` from the sysroot, ui-fulldeps tests should also be able to load it from the sysroot. That allows us to run fulldeps tests with stage1, without having to fully rebuild the compiler twice. It does unfortunately have the downside that we're running the tests on the *bootstrap* compiler, not the in-tree sources, but since most of the fulldeps tests are for the *API* of the compiler, that seems ok. I think it's possible to extend this to `run-make-fulldeps`, but I've run out of energy for tonight. - Move `plugin` tests into a subdirectory. Plugins are loaded at runtime with `dlopen` and so require the ABI of the running compile to match the ABI of the compiler linked with `rustc_driver`. As a result they can't be supported in stage 1 and have to use `// ignore-stage1`. - Remove `ignore-stage1` from most non-plugin tests - Ignore diagnostic tests in stage 1. Even though this requires a stage 2 build to load rustc_driver, it's primarily testing the error message that the *running* compiler emits when the diagnostic struct is malformed. - Pass `-Zforce-unstable-if-unmarked` in stage1, not just stage2. That allows running `hash-stable-is-unstable` in stage1, since it now suggests adding `rustc_private` to enable loading the crates. - Add libLLVM.so to the stage0 target sysroot, to allow fulldeps tests that act as custom drivers to load it at runtime. - Pass `--sysroot stage0-sysroot` in compiletest so that we use the correct version of std.
658 lines
20 KiB
Plaintext
658 lines
20 KiB
Plaintext
error: unsupported type attribute for diagnostic derive enum
|
|
--> $DIR/diagnostic-derive.rs:42:1
|
|
|
|
|
LL | #[diag(no_crate_example, code = "E0123")]
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: diagnostic slug not specified
|
|
--> $DIR/diagnostic-derive.rs:45:5
|
|
|
|
|
LL | Foo,
|
|
| ^^^
|
|
|
|
|
= help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]`
|
|
|
|
error: diagnostic slug not specified
|
|
--> $DIR/diagnostic-derive.rs:47:5
|
|
|
|
|
LL | Bar,
|
|
| ^^^
|
|
|
|
|
= help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]`
|
|
|
|
error: expected parentheses: #[diag(...)]
|
|
--> $DIR/diagnostic-derive.rs:53:8
|
|
|
|
|
LL | #[diag = "E0123"]
|
|
| ^
|
|
|
|
error: `#[nonsense(...)]` is not a valid attribute
|
|
--> $DIR/diagnostic-derive.rs:58:1
|
|
|
|
|
LL | #[nonsense(no_crate_example, code = "E0123")]
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: diagnostic slug not specified
|
|
--> $DIR/diagnostic-derive.rs:58:1
|
|
|
|
|
LL | / #[nonsense(no_crate_example, code = "E0123")]
|
|
LL | |
|
|
LL | |
|
|
LL | |
|
|
LL | | struct InvalidStructAttr {}
|
|
| |___________________________^
|
|
|
|
|
= help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]`
|
|
|
|
error: diagnostic slug not specified
|
|
--> $DIR/diagnostic-derive.rs:65:1
|
|
|
|
|
LL | / #[diag("E0123")]
|
|
LL | |
|
|
LL | | struct InvalidLitNestedAttr {}
|
|
| |______________________________^
|
|
|
|
|
= help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]`
|
|
|
|
error: diagnostic slug must be the first argument
|
|
--> $DIR/diagnostic-derive.rs:75:16
|
|
|
|
|
LL | #[diag(nonsense("foo"), code = "E0123", slug = "foo")]
|
|
| ^
|
|
|
|
error: diagnostic slug not specified
|
|
--> $DIR/diagnostic-derive.rs:75:1
|
|
|
|
|
LL | / #[diag(nonsense("foo"), code = "E0123", slug = "foo")]
|
|
LL | |
|
|
LL | |
|
|
LL | | struct InvalidNestedStructAttr1 {}
|
|
| |__________________________________^
|
|
|
|
|
= help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]`
|
|
|
|
error: unknown argument
|
|
--> $DIR/diagnostic-derive.rs:81:8
|
|
|
|
|
LL | #[diag(nonsense = "...", code = "E0123", slug = "foo")]
|
|
| ^^^^^^^^
|
|
|
|
|
= note: only the `code` parameter is valid after the slug
|
|
|
|
error: diagnostic slug not specified
|
|
--> $DIR/diagnostic-derive.rs:81:1
|
|
|
|
|
LL | / #[diag(nonsense = "...", code = "E0123", slug = "foo")]
|
|
LL | |
|
|
LL | |
|
|
LL | | struct InvalidNestedStructAttr2 {}
|
|
| |__________________________________^
|
|
|
|
|
= help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]`
|
|
|
|
error: unknown argument
|
|
--> $DIR/diagnostic-derive.rs:87:8
|
|
|
|
|
LL | #[diag(nonsense = 4, code = "E0123", slug = "foo")]
|
|
| ^^^^^^^^
|
|
|
|
|
= note: only the `code` parameter is valid after the slug
|
|
|
|
error: diagnostic slug not specified
|
|
--> $DIR/diagnostic-derive.rs:87:1
|
|
|
|
|
LL | / #[diag(nonsense = 4, code = "E0123", slug = "foo")]
|
|
LL | |
|
|
LL | |
|
|
LL | | struct InvalidNestedStructAttr3 {}
|
|
| |__________________________________^
|
|
|
|
|
= help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]`
|
|
|
|
error: unknown argument
|
|
--> $DIR/diagnostic-derive.rs:93:42
|
|
|
|
|
LL | #[diag(no_crate_example, code = "E0123", slug = "foo")]
|
|
| ^^^^
|
|
|
|
|
= note: only the `code` parameter is valid after the slug
|
|
|
|
error: `#[suggestion = ...]` is not a valid attribute
|
|
--> $DIR/diagnostic-derive.rs:100:5
|
|
|
|
|
LL | #[suggestion = "bar"]
|
|
| ^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: specified multiple times
|
|
--> $DIR/diagnostic-derive.rs:107:8
|
|
|
|
|
LL | #[diag(no_crate_example, code = "E0456")]
|
|
| ^^^^^^^^^^^^^^^^
|
|
|
|
|
note: previously specified here
|
|
--> $DIR/diagnostic-derive.rs:106:8
|
|
|
|
|
LL | #[diag(no_crate_example, code = "E0123")]
|
|
| ^^^^^^^^^^^^^^^^
|
|
|
|
error: specified multiple times
|
|
--> $DIR/diagnostic-derive.rs:107:26
|
|
|
|
|
LL | #[diag(no_crate_example, code = "E0456")]
|
|
| ^^^^
|
|
|
|
|
note: previously specified here
|
|
--> $DIR/diagnostic-derive.rs:106:26
|
|
|
|
|
LL | #[diag(no_crate_example, code = "E0123")]
|
|
| ^^^^
|
|
|
|
error: specified multiple times
|
|
--> $DIR/diagnostic-derive.rs:113:42
|
|
|
|
|
LL | #[diag(no_crate_example, code = "E0456", code = "E0457")]
|
|
| ^^^^
|
|
|
|
|
note: previously specified here
|
|
--> $DIR/diagnostic-derive.rs:113:26
|
|
|
|
|
LL | #[diag(no_crate_example, code = "E0456", code = "E0457")]
|
|
| ^^^^
|
|
|
|
error: diagnostic slug must be the first argument
|
|
--> $DIR/diagnostic-derive.rs:118:43
|
|
|
|
|
LL | #[diag(no_crate_example, no_crate::example, code = "E0456")]
|
|
| ^
|
|
|
|
error: diagnostic slug not specified
|
|
--> $DIR/diagnostic-derive.rs:123:1
|
|
|
|
|
LL | struct KindNotProvided {}
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]`
|
|
|
|
error: diagnostic slug not specified
|
|
--> $DIR/diagnostic-derive.rs:126:1
|
|
|
|
|
LL | / #[diag(code = "E0456")]
|
|
LL | |
|
|
LL | | struct SlugNotProvided {}
|
|
| |_________________________^
|
|
|
|
|
= help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]`
|
|
|
|
error: the `#[primary_span]` attribute can only be applied to fields of type `Span` or `MultiSpan`
|
|
--> $DIR/diagnostic-derive.rs:137:5
|
|
|
|
|
LL | #[primary_span]
|
|
| ^^^^^^^^^^^^^^^
|
|
|
|
error: `#[nonsense]` is not a valid attribute
|
|
--> $DIR/diagnostic-derive.rs:145:5
|
|
|
|
|
LL | #[nonsense]
|
|
| ^^^^^^^^^^^
|
|
|
|
error: the `#[label(...)]` attribute can only be applied to fields of type `Span` or `MultiSpan`
|
|
--> $DIR/diagnostic-derive.rs:162:5
|
|
|
|
|
LL | #[label(no_crate_label)]
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: `name` doesn't refer to a field on this type
|
|
--> $DIR/diagnostic-derive.rs:170:46
|
|
|
|
|
LL | #[suggestion(no_crate_suggestion, code = "{name}")]
|
|
| ^^^^^^^^
|
|
|
|
error: invalid format string: expected `'}'` but string was terminated
|
|
--> $DIR/diagnostic-derive.rs:175:10
|
|
|
|
|
LL | #[derive(Diagnostic)]
|
|
| ^^^^^^^^^^ expected `'}'` in format string
|
|
|
|
|
= note: if you intended to print `{`, you can escape it using `{{`
|
|
= note: this error originates in the derive macro `Diagnostic` (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
|
|
error: invalid format string: unmatched `}` found
|
|
--> $DIR/diagnostic-derive.rs:185:10
|
|
|
|
|
LL | #[derive(Diagnostic)]
|
|
| ^^^^^^^^^^ unmatched `}` in format string
|
|
|
|
|
= note: if you intended to print `}`, you can escape it using `}}`
|
|
= note: this error originates in the derive macro `Diagnostic` (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:205:5
|
|
|
|
|
LL | #[label(no_crate_label)]
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: suggestion without `code = "..."`
|
|
--> $DIR/diagnostic-derive.rs:224:5
|
|
|
|
|
LL | #[suggestion(no_crate_suggestion)]
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: invalid nested attribute
|
|
--> $DIR/diagnostic-derive.rs:232:18
|
|
|
|
|
LL | #[suggestion(nonsense = "bar")]
|
|
| ^^^^^^^^
|
|
|
|
|
= help: only `style`, `code` and `applicability` are valid nested attributes
|
|
|
|
error: suggestion without `code = "..."`
|
|
--> $DIR/diagnostic-derive.rs:232:5
|
|
|
|
|
LL | #[suggestion(nonsense = "bar")]
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: invalid nested attribute
|
|
--> $DIR/diagnostic-derive.rs:241:18
|
|
|
|
|
LL | #[suggestion(msg = "bar")]
|
|
| ^^^
|
|
|
|
|
= help: only `style`, `code` and `applicability` are valid nested attributes
|
|
|
|
error: suggestion without `code = "..."`
|
|
--> $DIR/diagnostic-derive.rs:241:5
|
|
|
|
|
LL | #[suggestion(msg = "bar")]
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: wrong field type for suggestion
|
|
--> $DIR/diagnostic-derive.rs:264:5
|
|
|
|
|
LL | / #[suggestion(no_crate_suggestion, code = "This is suggested code")]
|
|
LL | |
|
|
LL | | suggestion: Applicability,
|
|
| |_____________________________^
|
|
|
|
|
= help: `#[suggestion(...)]` should be applied to fields of type `Span` or `(Span, Applicability)`
|
|
|
|
error: specified multiple times
|
|
--> $DIR/diagnostic-derive.rs:280:24
|
|
|
|
|
LL | suggestion: (Span, Span, Applicability),
|
|
| ^^^^
|
|
|
|
|
note: previously specified here
|
|
--> $DIR/diagnostic-derive.rs:280:18
|
|
|
|
|
LL | suggestion: (Span, Span, Applicability),
|
|
| ^^^^
|
|
|
|
error: specified multiple times
|
|
--> $DIR/diagnostic-derive.rs:288:33
|
|
|
|
|
LL | suggestion: (Applicability, Applicability, Span),
|
|
| ^^^^^^^^^^^^^
|
|
|
|
|
note: previously specified here
|
|
--> $DIR/diagnostic-derive.rs:288:18
|
|
|
|
|
LL | suggestion: (Applicability, Applicability, Span),
|
|
| ^^^^^^^^^^^^^
|
|
|
|
error: `#[label = ...]` is not a valid attribute
|
|
--> $DIR/diagnostic-derive.rs:295:5
|
|
|
|
|
LL | #[label = "bar"]
|
|
| ^^^^^^^^^^^^^^^^
|
|
|
|
error: specified multiple times
|
|
--> $DIR/diagnostic-derive.rs:446:5
|
|
|
|
|
LL | #[suggestion(no_crate_suggestion, code = "...", applicability = "maybe-incorrect")]
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
note: previously specified here
|
|
--> $DIR/diagnostic-derive.rs:448:24
|
|
|
|
|
LL | suggestion: (Span, Applicability),
|
|
| ^^^^^^^^^^^^^
|
|
|
|
error: invalid applicability
|
|
--> $DIR/diagnostic-derive.rs:454:69
|
|
|
|
|
LL | #[suggestion(no_crate_suggestion, code = "...", applicability = "batman")]
|
|
| ^^^^^^^^
|
|
|
|
error: the `#[help(...)]` attribute can only be applied to fields of type `Span`, `MultiSpan`, `bool` or `()`
|
|
--> $DIR/diagnostic-derive.rs:521:5
|
|
|
|
|
LL | #[help(no_crate_help)]
|
|
| ^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: a diagnostic slug must be the first argument to the attribute
|
|
--> $DIR/diagnostic-derive.rs:530:32
|
|
|
|
|
LL | #[label(no_crate_label, foo)]
|
|
| ^
|
|
|
|
error: invalid nested attribute
|
|
--> $DIR/diagnostic-derive.rs:538:29
|
|
|
|
|
LL | #[label(no_crate_label, foo = "...")]
|
|
| ^^^
|
|
|
|
error: invalid nested attribute
|
|
--> $DIR/diagnostic-derive.rs:546:29
|
|
|
|
|
LL | #[label(no_crate_label, foo("..."))]
|
|
| ^^^
|
|
|
|
error: `#[primary_span]` is not a valid attribute
|
|
--> $DIR/diagnostic-derive.rs:558: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:578:1
|
|
|
|
|
LL | #[error(no_crate_example, code = "E0123")]
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: diagnostic slug not specified
|
|
--> $DIR/diagnostic-derive.rs:578:1
|
|
|
|
|
LL | / #[error(no_crate_example, code = "E0123")]
|
|
LL | |
|
|
LL | |
|
|
LL | |
|
|
LL | | struct ErrorAttribute {}
|
|
| |________________________^
|
|
|
|
|
= help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]`
|
|
|
|
error: `#[warn_(...)]` is not a valid attribute
|
|
--> $DIR/diagnostic-derive.rs:585:1
|
|
|
|
|
LL | #[warn_(no_crate_example, code = "E0123")]
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: diagnostic slug not specified
|
|
--> $DIR/diagnostic-derive.rs:585:1
|
|
|
|
|
LL | / #[warn_(no_crate_example, code = "E0123")]
|
|
LL | |
|
|
LL | |
|
|
LL | |
|
|
LL | | struct WarnAttribute {}
|
|
| |_______________________^
|
|
|
|
|
= help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]`
|
|
|
|
error: `#[lint(...)]` is not a valid attribute
|
|
--> $DIR/diagnostic-derive.rs:592:1
|
|
|
|
|
LL | #[lint(no_crate_example, code = "E0123")]
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: diagnostic slug not specified
|
|
--> $DIR/diagnostic-derive.rs:592:1
|
|
|
|
|
LL | / #[lint(no_crate_example, code = "E0123")]
|
|
LL | |
|
|
LL | |
|
|
LL | |
|
|
LL | | struct LintAttributeOnSessionDiag {}
|
|
| |____________________________________^
|
|
|
|
|
= help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]`
|
|
|
|
error: `#[lint(...)]` is not a valid attribute
|
|
--> $DIR/diagnostic-derive.rs:599:1
|
|
|
|
|
LL | #[lint(no_crate_example, code = "E0123")]
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: `#[lint(...)]` is not a valid attribute
|
|
--> $DIR/diagnostic-derive.rs:599:1
|
|
|
|
|
LL | #[lint(no_crate_example, code = "E0123")]
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: diagnostic slug not specified
|
|
--> $DIR/diagnostic-derive.rs:599:1
|
|
|
|
|
LL | / #[lint(no_crate_example, code = "E0123")]
|
|
LL | |
|
|
LL | |
|
|
LL | |
|
|
LL | |
|
|
LL | | struct LintAttributeOnLintDiag {}
|
|
| |_________________________________^
|
|
|
|
|
= help: specify the slug as the first argument to the attribute, such as `#[diag(compiletest_example)]`
|
|
|
|
error: specified multiple times
|
|
--> $DIR/diagnostic-derive.rs:609:53
|
|
|
|
|
LL | #[suggestion(no_crate_suggestion, code = "...", code = ",,,")]
|
|
| ^^^^
|
|
|
|
|
note: previously specified here
|
|
--> $DIR/diagnostic-derive.rs:609:39
|
|
|
|
|
LL | #[suggestion(no_crate_suggestion, code = "...", code = ",,,")]
|
|
| ^^^^
|
|
|
|
error: wrong types for suggestion
|
|
--> $DIR/diagnostic-derive.rs:618:24
|
|
|
|
|
LL | suggestion: (Span, usize),
|
|
| ^^^^^
|
|
|
|
|
= help: `#[suggestion(...)]` on a tuple field must be applied to fields of type `(Span, Applicability)`
|
|
|
|
error: wrong types for suggestion
|
|
--> $DIR/diagnostic-derive.rs:626:17
|
|
|
|
|
LL | suggestion: (Span,),
|
|
| ^^^^^^^
|
|
|
|
|
= help: `#[suggestion(...)]` on a tuple field must be applied to fields of type `(Span, Applicability)`
|
|
|
|
error: suggestion without `code = "..."`
|
|
--> $DIR/diagnostic-derive.rs:633:5
|
|
|
|
|
LL | #[suggestion(no_crate_suggestion)]
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: `#[multipart_suggestion(...)]` is not a valid attribute
|
|
--> $DIR/diagnostic-derive.rs:640:1
|
|
|
|
|
LL | #[multipart_suggestion(no_crate_suggestion)]
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= help: consider creating a `Subdiagnostic` instead
|
|
|
|
error: `#[multipart_suggestion(...)]` is not a valid attribute
|
|
--> $DIR/diagnostic-derive.rs:647:5
|
|
|
|
|
LL | #[multipart_suggestion(no_crate_suggestion)]
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= help: consider creating a `Subdiagnostic` instead
|
|
|
|
error: unexpected end of input, unexpected token in nested attribute, expected ident
|
|
--> $DIR/diagnostic-derive.rs:643:24
|
|
|
|
|
LL | #[multipart_suggestion()]
|
|
| ^
|
|
|
|
error: `#[suggestion(...)]` is not a valid attribute
|
|
--> $DIR/diagnostic-derive.rs:655:1
|
|
|
|
|
LL | #[suggestion(no_crate_suggestion, code = "...")]
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= help: `#[label]` and `#[suggestion]` can only be applied to fields
|
|
|
|
error: `#[label]` is not a valid attribute
|
|
--> $DIR/diagnostic-derive.rs:664:1
|
|
|
|
|
LL | #[label]
|
|
| ^^^^^^^^
|
|
|
|
|
= help: `#[label]` and `#[suggestion]` can only be applied to fields
|
|
|
|
error: `eager` is the only supported nested attribute for `subdiagnostic`
|
|
--> $DIR/diagnostic-derive.rs:698:7
|
|
|
|
|
LL | #[subdiagnostic(bad)]
|
|
| ^^^^^^^^^^^^^^^^^^
|
|
|
|
error: `#[subdiagnostic = ...]` is not a valid attribute
|
|
--> $DIR/diagnostic-derive.rs:706:5
|
|
|
|
|
LL | #[subdiagnostic = "bad"]
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: `eager` is the only supported nested attribute for `subdiagnostic`
|
|
--> $DIR/diagnostic-derive.rs:714:7
|
|
|
|
|
LL | #[subdiagnostic(bad, bad)]
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: `eager` is the only supported nested attribute for `subdiagnostic`
|
|
--> $DIR/diagnostic-derive.rs:722:7
|
|
|
|
|
LL | #[subdiagnostic("bad")]
|
|
| ^^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: `#[subdiagnostic(...)]` is not a valid attribute
|
|
--> $DIR/diagnostic-derive.rs:730:5
|
|
|
|
|
LL | #[subdiagnostic(eager)]
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= help: eager subdiagnostics are not supported on lints
|
|
|
|
error: expected at least one string literal for `code(...)`
|
|
--> $DIR/diagnostic-derive.rs:788:23
|
|
|
|
|
LL | #[suggestion(code())]
|
|
| ^
|
|
|
|
error: `code(...)` must contain only string literals
|
|
--> $DIR/diagnostic-derive.rs:796:23
|
|
|
|
|
LL | #[suggestion(code(foo))]
|
|
| ^^^
|
|
|
|
error: unexpected token
|
|
--> $DIR/diagnostic-derive.rs:796:23
|
|
|
|
|
LL | #[suggestion(code(foo))]
|
|
| ^^^
|
|
|
|
error: expected string literal
|
|
--> $DIR/diagnostic-derive.rs:805:25
|
|
|
|
|
LL | #[suggestion(code = 3)]
|
|
| ^
|
|
|
|
error: `#[suggestion(...)]` is not a valid attribute
|
|
--> $DIR/diagnostic-derive.rs:820:5
|
|
|
|
|
LL | #[suggestion(no_crate_suggestion, code = "")]
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= note: `#[suggestion(...)]` applied to `Vec` field is ambiguous
|
|
= help: to show a suggestion consisting of multiple parts, use a `Subdiagnostic` annotated with `#[multipart_suggestion(...)]`
|
|
= help: to show a variable set of suggestions, use a `Vec` of `Subdiagnostic`s annotated with `#[suggestion(...)]`
|
|
|
|
error: cannot find attribute `nonsense` in this scope
|
|
--> $DIR/diagnostic-derive.rs:58:3
|
|
|
|
|
LL | #[nonsense(no_crate_example, code = "E0123")]
|
|
| ^^^^^^^^
|
|
|
|
error: cannot find attribute `nonsense` in this scope
|
|
--> $DIR/diagnostic-derive.rs:145:7
|
|
|
|
|
LL | #[nonsense]
|
|
| ^^^^^^^^
|
|
|
|
error: cannot find attribute `error` in this scope
|
|
--> $DIR/diagnostic-derive.rs:578:3
|
|
|
|
|
LL | #[error(no_crate_example, code = "E0123")]
|
|
| ^^^^^
|
|
|
|
error: cannot find attribute `warn_` in this scope
|
|
--> $DIR/diagnostic-derive.rs:585:3
|
|
|
|
|
LL | #[warn_(no_crate_example, 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:592:3
|
|
|
|
|
LL | #[lint(no_crate_example, 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:599:3
|
|
|
|
|
LL | #[lint(no_crate_example, code = "E0123")]
|
|
| ^^^^ help: a built-in attribute with a similar name exists: `link`
|
|
|
|
error: cannot find attribute `multipart_suggestion` in this scope
|
|
--> $DIR/diagnostic-derive.rs:640:3
|
|
|
|
|
LL | #[multipart_suggestion(no_crate_suggestion)]
|
|
| ^^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: cannot find attribute `multipart_suggestion` in this scope
|
|
--> $DIR/diagnostic-derive.rs:643:3
|
|
|
|
|
LL | #[multipart_suggestion()]
|
|
| ^^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: cannot find attribute `multipart_suggestion` in this scope
|
|
--> $DIR/diagnostic-derive.rs:647:7
|
|
|
|
|
LL | #[multipart_suggestion(no_crate_suggestion)]
|
|
| ^^^^^^^^^^^^^^^^^^^^
|
|
|
|
error[E0425]: cannot find value `nonsense` in module `crate::fluent_generated`
|
|
--> $DIR/diagnostic-derive.rs:70:8
|
|
|
|
|
LL | #[diag(nonsense, code = "E0123")]
|
|
| ^^^^^^^^ not found in `crate::fluent_generated`
|
|
|
|
error[E0425]: cannot find value `__code_34` in this scope
|
|
--> $DIR/diagnostic-derive.rs:802:10
|
|
|
|
|
LL | #[derive(Diagnostic)]
|
|
| ^^^^^^^^^^ not found in this scope
|
|
|
|
|
= note: this error originates in the derive macro `Diagnostic` (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
|
|
error[E0277]: the trait bound `Hello: IntoDiagnosticArg` is not satisfied
|
|
--> $DIR/diagnostic-derive.rs:339:10
|
|
|
|
|
LL | #[derive(Diagnostic)]
|
|
| ^^^^^^^^^^ 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:LL:CC
|
|
= note: this error originates in the derive macro `Diagnostic` which comes from the expansion of the macro `forward` (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
|
|
error: aborting due to 84 previous errors
|
|
|
|
Some errors have detailed explanations: E0277, E0425.
|
|
For more information about an error, try `rustc --explain E0277`.
|