rust
rust copied to clipboard
errors: generate typed identifiers in each crate
Instead of loading the Fluent resources for every crate in rustc_error_messages
, each crate generates typed identifiers for its own diagnostics and creates a static which are pulled together in the rustc_driver
crate and provided to the diagnostic emitter.
There are advantages and disadvantages to this change..
Advantages
- Changing a diagnostic now only recompiles the crate for that diagnostic and those crates that depend on it, rather than
rustc_error_messages
and all crates thereafter. - This approach can be used to support first-party crates that want to supply translatable diagnostics (e.g.
rust-lang/thorin
in https://github.com/rust-lang/rust/pull/102612#discussion_r985372582, cc @JhonnyBillM) - We can extend this a little so that tools built using rustc internals (like clippy or rustdoc) can add their own diagnostic resources (much more easily than those resources needing to be available to
rustc_error_messages
)
Disadvantages
- Crates can only refer to the diagnostic messages defined in the current crate (or those from dependencies), rather than all diagnostic messages.
-
rustc_driver
(or some other crate we create for this purpose) has to directly depend on everything that has error messages.- It already transitively depended on all these crates.
Pending work
- [x] I don't know how to make
rustc_codegen_gcc
's translated diagnostics work with this approach - becauserustc_driver
can't depend on that crate and so can't get its resources to provide to the diagnostic emission. I don't really know how the alternative codegen backends are actually wired up to the compiler at all. - [ ] Update
triagebot.toml
to track the moved FTL files.
r? @compiler-errors cc #100717
The job x86_64-gnu-llvm-13
failed! Check out the build log: (web) (plain)
Click to see the possible cause of the failure (guessed by this bot)
error: test run failed!
status: exit status: 101
command: "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui-fulldeps/pprust-expr-roundtrip/a"
--- stdout -------------------------------
printed: box box x
printed: box x()
printed: box x.x(x)
printed: box x.x(x)
printed: box (x + x)
printed: box (x + x)
printed: box (x * x)
printed: box (x * x)
printed: box (x << x)
printed: box (x << x)
printed: box (x && x)
printed: box (x && x)
printed: box (x || x)
printed: box (x || x)
printed: box (x < x)
printed: box (x < x)
printed: box *x
printed: box if x {}
printed: box (move || x)
printed: box (x = x)
printed: box (x = x)
printed: box x.f
printed: box (x..x)
printed: box (x..x)
printed: box &x
printed: box (return)
printed: box (return x)
printed: box S { ..x }
printed: box x?
printed: box let _ = x
--- stderr -------------------------------
--- stderr -------------------------------
thread 'main' panicked at 'failed to find message in primary or fallback fluent bundles', compiler/rustc_errors/src/translation.rs:78:9
------------------------------------------
The job x86_64-gnu-llvm-13
failed! Check out the build log: (web) (plain)
Click to see the possible cause of the failure (guessed by this bot)
Some tests failed in compiletest suite=run-make-fulldeps mode=run-make host=x86_64-unknown-linux-gnu target=x86_64-unknown-linux-gnu
...................................i...ii................
failures:
---- [run-make] src/test/run-make-fulldeps/issue-19371 stdout ----
error: make failed
status: exit status: 2
command: "make"
--- stdout -------------------------------
--- stdout -------------------------------
LD_LIBRARY_PATH="/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make-fulldeps/issue-19371/issue-19371:/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib:/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-bootstrap-tools/x86_64-unknown-linux-gnu/release/deps:/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/lib" '/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc' --out-dir /checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make-fulldeps/issue-19371/issue-19371 -L /checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make-fulldeps/issue-19371/issue-19371 foo.rs
--- stderr -------------------------------
error[E0063]: missing field `locale_resources` in initializer of `Config`
--> foo.rs:49:18
|
:umbrella: The latest upstream changes (presumably #103083) made this pull request unmergeable. Please resolve the merge conflicts.
I wonder if it would be possible to collect all the locale files into one directory in
compiler/
, maybecompiler/locales
. Then the translation tool could be pointed at that, and you would only have one directory for each individual language, instead of one per crate. It would also help with ignoring the ftl files during a grep.
I don't have a particularly strong preference here. I don't know if there is a significant advantage to this. I haven't looked into how the translation tooling works to know whether a single directory will be easier or not, but it is very likely that only the original English will be in this repository regardless.
Also I wonder if instead of extending the driver, one could add another crate that collects all the translations, and have rustc_driver depend on that. Not sure about this one tho. Thoughts?
We could do this, it's really only an aesthetic consideration, so I don't have a strong opinion.
In both cases, will wait for others to weigh in.
I don't really know how the alternative codegen backends are actually wired up to the compiler at all.
I've looked at rustc_codegen_gcc and it seems to use the CodegenBackend
trait through the codegen-backend feature. It seems that rustc_driver calls a function to generate a boxed trait object implementing that trait. Maybe that trait could be extended? cc @bjorn3
it is very likely that only the original English will be in this repository regardless.
Oh that changes a few things. In that case, the current state is okay. I wonder about the extra directory level, but that's only a papercut, as the disadvantage of it is quite minor (extra click in many IDEs). Some people might in fact prefer the locale/
dir over a raw file due to stylistic concerns.
The job x86_64-gnu-llvm-13
failed! Check out the build log: (web) (plain)
Click to see the possible cause of the failure (guessed by this bot)
Check compiletest suite=run-make mode=run-make (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
running 70 tests
Some tests failed in compiletest suite=run-make mode=run-make host=x86_64-unknown-linux-gnu target=x86_64-unknown-linux-gnu
iii...i.i..i......iiiii..............ii.i..iiiiiii.iiii..F............
---- [run-make] src/test/run-make/translation stdout ----
error: make failed
error: make failed
status: exit status: 2
command: "make"
--- stdout -------------------------------
LD_LIBRARY_PATH="/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/translation/translation:/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib:/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-bootstrap-tools/x86_64-unknown-linux-gnu/release/deps:/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/lib" '/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc' --out-dir /checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/translation/translation -L /checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/translation/translation test.rs 2>&1 | grep "struct literal body without path"
error: struct literal body without path
error: struct literal body without path
LD_LIBRARY_PATH="/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/translation/translation:/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib:/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-bootstrap-tools/x86_64-unknown-linux-gnu/release/deps:/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/lib" '/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc' --out-dir /checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/translation/translation -L /checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/translation/translation test.rs -Ztranslate-additional-ftl=/checkout/src/test/run-make/translation/working.ftl 2>&1 | grep "this is a test message"
--- stderr -------------------------------
--- stderr -------------------------------
make: *** [Makefile:19: custom] Error 1
failures:
The job x86_64-gnu-tools
failed! Check out the build log: (web) (plain)
Click to see the possible cause of the failure (guessed by this bot)
test test::configuration_snippet::configuration_snippet_tests ... ok
Mismatch at src/parse/session.rs:125:
} else {
let fallback_bundle = rustc_errors::fallback_fluent_bundle(
rustc_driver::DEFAULT_LOCALE_RESOURCES.to_vec(),
+ false,
);
);
Box::new(EmitterWriter::stderr(
color_cfg,
test test::system_tests ... ok
test test::idempotence_tests ... ok
failures:
failures:
---- test::self_tests stdout ----
Ran 5 self tests.
thread 'test::self_tests' panicked at 'assertion failed: `(left == right)`
left: `1`,
right: `0`: 1 self tests failed', src/tools/rustfmt/src/test/mod.rs:400:5
failures:
test::self_tests
The job x86_64-gnu-llvm-13
failed! Check out the build log: (web) (plain)
Click to see the possible cause of the failure (guessed by this bot)
error: make failed
status: exit status: 2
command: "make"
--- stdout -------------------------------
/bin/echo || exit 0 # This test requires /bin/echo to exist
LD_LIBRARY_PATH="/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make-fulldeps/hotplug_codegen_backend/hotplug_codegen_backend:/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib:/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-bootstrap-tools/x86_64-unknown-linux-gnu/release/deps:/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/lib" '/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc' --out-dir /checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make-fulldeps/hotplug_codegen_backend/hotplug_codegen_backend -L /checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make-fulldeps/hotplug_codegen_backend/hotplug_codegen_backend the_backend.rs --crate-name the_backend --crate-type dylib \
-o /checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make-fulldeps/hotplug_codegen_backend/hotplug_codegen_backend/the_backend.dylib
--- stderr -------------------------------
warning: ignoring --out-dir flag due to -o flag
error[E0046]: not all trait items implemented, missing: `locale_resource`
error[E0046]: not all trait items implemented, missing: `locale_resource`
--> the_backend.rs:29:1
|
29 | impl CodegenBackend for TheBackend {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `locale_resource` in implementation
|
= help: implement the missing item: `fn locale_resource(&self) -> &'static str { todo!() }`
error: aborting due to previous error; 1 warning emitted
For more information about this error, try `rustc --explain E0046`.
make: *** [Makefile:11: all] Error 1
:umbrella: The latest upstream changes (presumably #103151) made this pull request unmergeable. Please resolve the merge conflicts.
:umbrella: The latest upstream changes (presumably #102769) made this pull request unmergeable. Please resolve the merge conflicts.
:umbrella: The latest upstream changes (presumably #103344) made this pull request unmergeable. Please resolve the merge conflicts.
The job x86_64-gnu-llvm-13
failed! Check out the build log: (web) (plain)
Click to see the possible cause of the failure (guessed by this bot)
Copying stage2 rustc from stage1 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu / x86_64-unknown-linux-gnu)
Check compiletest suite=ui-fulldeps mode=ui (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
running 71 tests
Some tests failed in compiletest suite=ui-fulldeps mode=ui host=x86_64-unknown-linux-gnu target=x86_64-unknown-linux-gnu
.......................i..................................F.F..........
---- [ui] src/test/ui-fulldeps/session-diagnostic/subdiagnostic-derive.rs stdout ----
diff of stderr:
416 | ^^^^^^^^^^^^^^^^
417
418 error: expected exactly one string literal for `code = ...`
- --> $DIR/subdiagnostic-derive.rs:668:23
420 |
420 |
421 LL | #[suggestion_part(code("foo"))]
423
423
424 error: expected exactly one string literal for `code = ...`
- --> $DIR/subdiagnostic-derive.rs:677:23
426 |
426 |
427 LL | #[suggestion_part(code("foo", "bar"))]
429
429
430 error: expected exactly one string literal for `code = ...`
- --> $DIR/subdiagnostic-derive.rs:686:23
432 |
432 |
433 LL | #[suggestion_part(code(3))]
435
435
436 error: expected exactly one string literal for `code = ...`
- --> $DIR/subdiagnostic-derive.rs:695:23
438 |
438 |
439 LL | #[suggestion_part(code())]
441
441
442 error: `code = "..."`/`code(...)` must contain only string literals
- --> $DIR/subdiagnostic-derive.rs:704:23
444 |
444 |
445 LL | #[suggestion_part(code = 3)]
505 LL | #[label(slug)]
506 | ^^^^ not found in `crate::fluent_generated`
- error: aborting due to 72 previous errors
+ error[E0425]: cannot find value `parser_add_paren` in module `crate::fluent_generated`
+ --> $DIR/subdiagnostic-derive.rs:668:24
+ |
+ |
+ LL | #[multipart_suggestion(parser_add_paren)]
+ | ^^^^^^^^^^^^^^^^ not found in `crate::fluent_generated`
+ error[E0425]: cannot find value `parser_add_paren` in module `crate::fluent_generated`
+ --> $DIR/subdiagnostic-derive.rs:677:24
+ |
+ |
+ LL | #[multipart_suggestion(parser_add_paren)]
+ | ^^^^^^^^^^^^^^^^ not found in `crate::fluent_generated`
+ error[E0425]: cannot find value `parser_add_paren` in module `crate::fluent_generated`
+ --> $DIR/subdiagnostic-derive.rs:686:24
+ |
+ |
+ LL | #[multipart_suggestion(parser_add_paren)]
+ | ^^^^^^^^^^^^^^^^ not found in `crate::fluent_generated`
+ error[E0425]: cannot find value `parser_add_paren` in module `crate::fluent_generated`
+ --> $DIR/subdiagnostic-derive.rs:695:24
+ |
+ |
+ LL | #[multipart_suggestion(parser_add_paren)]
+ | ^^^^^^^^^^^^^^^^ not found in `crate::fluent_generated`
+ error[E0425]: cannot find value `parser_add_paren` in module `crate::fluent_generated`
+ --> $DIR/subdiagnostic-derive.rs:704:24
+ |
+ |
+ LL | #[multipart_suggestion(parser_add_paren)]
+ | ^^^^^^^^^^^^^^^^ not found in `crate::fluent_generated`
+ error: aborting due to 77 previous errors
509
510 For more information about this error, try `rustc --explain E0425`.
511
---
To only update this specific test, also pass `--test-args session-diagnostic/subdiagnostic-derive.rs`
error: 1 errors occurred comparing output.
status: exit status: 1
command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui-fulldeps/session-diagnostic/subdiagnostic-derive.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui-fulldeps/session-diagnostic/subdiagnostic-derive" "-A" "unused" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui-fulldeps/session-diagnostic/subdiagnostic-derive/auxiliary"
stdout: none
--- stderr -------------------------------
error: label without `#[primary_span]` field
|
|
LL | / #[label(no_crate_example)]
LL | | //~^ ERROR label without `#[primary_span]` field
LL | | struct C {
LL | | var: String,
LL | | }
error: diagnostic slug must be first argument of a `#[label(...)]` attribute
|
LL | #[label]
| ^^^^^^^^
error: `#[foo]` is not a valid attribute
|
LL | #[foo]
| ^^^^^^
error: `#[label = ...]` is not a valid attribute
|
|
LL | #[label = "..."]
error: `#[label(bug = ...)]` is not a valid attribute
|
|
LL | #[label(bug = "...")]
error: diagnostic slug must be first argument of a `#[label(...)]` attribute
|
|
LL | #[label(bug = "...")]
error: `#[label("...")]` is not a valid attribute
|
|
LL | #[label("...")]
error: diagnostic slug must be first argument of a `#[label(...)]` attribute
|
|
LL | #[label("...")]
error: `#[label(slug = ...)]` is not a valid attribute
|
|
LL | #[label(slug = 4)]
error: diagnostic slug must be first argument of a `#[label(...)]` attribute
|
|
LL | #[label(slug = 4)]
error: `#[label(slug(...))]` is not a valid attribute
|
|
LL | #[label(slug("..."))]
error: diagnostic slug must be first argument of a `#[label(...)]` attribute
|
|
LL | #[label(slug("..."))]
error: diagnostic slug must be first argument of a `#[label(...)]` attribute
|
|
LL | #[label()]
error: `#[label(code = ...)]` is not a valid attribute
|
|
LL | #[label(no_crate_example, code = "...")]
error: `#[label(applicability = ...)]` is not a valid attribute
|
|
LL | #[label(no_crate_example, applicability = "machine-applicable")]
error: unsupported type attribute for subdiagnostic enum
--> /checkout/src/test/ui-fulldeps/session-diagnostic/subdiagnostic-derive.rs:161:1
|
|
LL | #[foo]
| ^^^^^^
error: `#[bar]` is not a valid attribute
|
LL | #[bar]
| ^^^^^^
error: `#[bar = ...]` is not a valid attribute
|
|
LL | #[bar = "..."]
error: `#[bar = ...]` is not a valid attribute
|
|
LL | #[bar = 4]
error: `#[bar(...)]` is not a valid attribute
|
|
LL | #[bar("...")]
error: `#[label(code = ...)]` is not a valid attribute
|
|
LL | #[label(code = "...")]
error: diagnostic slug must be first argument of a `#[label(...)]` attribute
|
|
LL | #[label(code = "...")]
error: the `#[primary_span]` attribute can only be applied to fields of type `Span` or `MultiSpan`
|
|
LL | #[primary_span]
error: label without `#[primary_span]` field
|
|
LL | / #[label(no_crate_example)]
LL | | //~^ ERROR label without `#[primary_span]` field
LL | | struct W {
LL | | #[primary_span]
LL | | //~^ ERROR the `#[primary_span]` attribute can only be applied to fields of type `Span` or `MultiSpan`
LL | | span: String,
LL | | }
error: `#[applicability]` is only valid on suggestions
|
LL | #[applicability]
| ^^^^^^^^^^^^^^^^
error: `#[bar]` is not a valid attribute
|
LL | #[bar]
| ^^^^^^
|
|
= help: only `primary_span`, `applicability` and `skip_arg` are valid field attributes
error: `#[bar = ...]` is not a valid attribute
|
|
LL | #[bar = "..."]
error: `#[bar(...)]` is not a valid attribute
|
|
LL | #[bar("...")]
|
|
= help: only `primary_span`, `applicability` and `skip_arg` are valid field attributes
error: unexpected unsupported untagged union
--> /checkout/src/test/ui-fulldeps/session-diagnostic/subdiagnostic-derive.rs:310:1
|
|
LL | / union AC {
LL | | //~^ ERROR unexpected unsupported untagged union
LL | | span: u32,
LL | | b: u64
LL | | }
error: `#[label(no_crate::example)]` is not a valid attribute
|
|
LL | #[label(no_crate_example, no_crate::example)]
|
|
= help: a diagnostic slug must be the first argument to the attribute
error: specified multiple times
--> /checkout/src/test/ui-fulldeps/session-diagnostic/subdiagnostic-derive.rs:338:5
|
|
LL | #[primary_span]
|
note: previously specified here
--> /checkout/src/test/ui-fulldeps/session-diagnostic/subdiagnostic-derive.rs:335:5
|
|
LL | #[primary_span]
error: subdiagnostic kind not specified
|
LL | struct AG {
| ^^
error: specified multiple times
--> /checkout/src/test/ui-fulldeps/session-diagnostic/subdiagnostic-derive.rs:381:46
|
LL | #[suggestion(no_crate_example, code = "...", code = "...")]
|
note: previously specified here
--> /checkout/src/test/ui-fulldeps/session-diagnostic/subdiagnostic-derive.rs:381:32
|
|
LL | #[suggestion(no_crate_example, code = "...", code = "...")]
error: specified multiple times
--> /checkout/src/test/ui-fulldeps/session-diagnostic/subdiagnostic-derive.rs:399:5
|
---
|
LL | #[applicability]
| ^^^^^^^^^^^^^^^^
error: the `#[applicability]` attribute can only be applied to fields of type `Applicability`
|
LL | #[applicability]
| ^^^^^^^^^^^^^^^^
error: suggestion without `code = "..."`
|
|
LL | #[suggestion(no_crate_example)]
error: invalid applicability
--> /checkout/src/test/ui-fulldeps/session-diagnostic/subdiagnostic-derive.rs:432:45
|
|
LL | #[suggestion(no_crate_example, code ="...", applicability = "foo")]
error: suggestion without `#[primary_span]` field
|
|
LL | / #[suggestion(no_crate_example, code = "...")]
LL | | //~^ ERROR suggestion without `#[primary_span]` field
LL | | struct AR {
LL | | var: String,
LL | | }
error: unsupported type attribute for subdiagnostic enum
--> /checkout/src/test/ui-fulldeps/session-diagnostic/subdiagnostic-derive.rs:464:1
|
|
LL | #[label]
| ^^^^^^^^
error: `var` doesn't refer to a field on this type
|
|
LL | #[suggestion(no_crate_example, code ="{var}", applicability = "machine-applicable")]
error: `var` doesn't refer to a field on this type
|
|
LL | #[suggestion(no_crate_example, code ="{var}", applicability = "machine-applicable")]
error: `#[suggestion_part]` is not a valid attribute
|
LL | #[suggestion_part]
| ^^^^^^^^^^^^^^^^^^
|
|
= help: `#[suggestion_part(...)]` is only valid in multipart suggestions, use `#[primary_span]` instead
error: `#[suggestion_part(...)]` is not a valid attribute
|
|
LL | #[suggestion_part(code = "...")]
|
|
= help: `#[suggestion_part(...)]` is only valid in multipart suggestions
error: suggestion without `#[primary_span]` field
|
|
LL | / #[suggestion(no_crate_example, code = "...")]
LL | | //~^ ERROR suggestion without `#[primary_span]` field
LL | | struct BA {
LL | | #[suggestion_part]
LL | | var: String,
LL | | }
| |_^
error: `#[multipart_suggestion(code = ...)]` is not a valid attribute
|
|
LL | #[multipart_suggestion(no_crate_example, code = "...", applicability = "machine-applicable")]
|
|
= help: only `applicability` is a valid nested attributes
error: multipart suggestion without any `#[suggestion_part(...)]` fields
|
|
LL | / #[multipart_suggestion(no_crate_example, code = "...", applicability = "machine-applicable")]
LL | | //~^ ERROR multipart suggestion without any `#[suggestion_part(...)]` fields
LL | | //~| ERROR `#[multipart_suggestion(code = ...)]` is not a valid attribute
LL | | struct BBa {
LL | | var: String,
LL | | }
error: `#[suggestion_part(...)]` attribute without `code = "..."`
|
LL | #[suggestion_part]
| ^^^^^^^^^^^^^^^^^^
error: `#[suggestion_part(...)]` attribute without `code = "..."`
|
|
LL | #[suggestion_part()]
error: `#[primary_span]` is not a valid attribute
|
|
LL | #[primary_span]
|
|
= help: multipart suggestions use one or more `#[suggestion_part]`s rather than one `#[primary_span]`
error: multipart suggestion without any `#[suggestion_part(...)]` fields
|
|
LL | / #[multipart_suggestion(no_crate_example)]
LL | | //~^ ERROR multipart suggestion without any `#[suggestion_part(...)]` fields
LL | | struct BC {
LL | | #[primary_span]
LL | | //~^ ERROR `#[primary_span]` is not a valid attribute
LL | | span: Span,
LL | | }
error: `#[suggestion_part(...)]` attribute without `code = "..."`
|
LL | #[suggestion_part]
| ^^^^^^^^^^^^^^^^^^
error: `#[suggestion_part(...)]` attribute without `code = "..."`
|
|
LL | #[suggestion_part()]
error: `#[suggestion_part(foo = ...)]` is not a valid attribute
|
|
LL | #[suggestion_part(foo = "bar")]
|
|
= help: `code` is the only valid nested attribute
error: the `#[suggestion_part(...)]` attribute can only be applied to fields of type `Span` or `MultiSpan`
|
|
LL | #[suggestion_part(code = "...")]
error: the `#[suggestion_part(...)]` attribute can only be applied to fields of type `Span` or `MultiSpan`
|
|
LL | #[suggestion_part()]
error: specified multiple times
--> /checkout/src/test/ui-fulldeps/session-diagnostic/subdiagnostic-derive.rs:593:37
|
|
LL | #[suggestion_part(code = "...", code = ",,,")]
|
note: previously specified here
--> /checkout/src/test/ui-fulldeps/session-diagnostic/subdiagnostic-derive.rs:593:23
|
|
LL | #[suggestion_part(code = "...", code = ",,,")]
error: `#[applicability]` has no effect if all `#[suggestion]`/`#[multipart_suggestion]` attributes have a static `applicability = "..."`
|
LL | #[applicability]
| ^^^^^^^^^^^^^^^^
error: expected exactly one string literal for `code = ...`
|
|
LL | #[suggestion_part(code("foo"))]
error: expected exactly one string literal for `code = ...`
|
|
LL | #[suggestion_part(code("foo", "bar"))]
error: expected exactly one string literal for `code = ...`
|
|
LL | #[suggestion_part(code(3))]
error: expected exactly one string literal for `code = ...`
|
|
LL | #[suggestion_part(code())]
error: `code = "..."`/`code(...)` must contain only string literals
|
|
LL | #[suggestion_part(code = 3)]
error: cannot find attribute `foo` in this scope
--> /checkout/src/test/ui-fulldeps/session-diagnostic/subdiagnostic-derive.rs:65:3
|
---
error: cannot find attribute `bar` in this scope
--> /checkout/src/test/ui-fulldeps/session-diagnostic/subdiagnostic-derive.rs:187:7
|
LL | #[bar = "..."]
error: cannot find attribute `bar` in this scope
--> /checkout/src/test/ui-fulldeps/session-diagnostic/subdiagnostic-derive.rs:199:7
|
|
LL | #[bar = 4]
error: cannot find attribute `bar` in this scope
--> /checkout/src/test/ui-fulldeps/session-diagnostic/subdiagnostic-derive.rs:211:7
|
|
LL | #[bar("...")]
error: cannot find attribute `bar` in this scope
--> /checkout/src/test/ui-fulldeps/session-diagnostic/subdiagnostic-derive.rs:272:7
|
|
LL | #[bar]
| ^^^
error: cannot find attribute `bar` in this scope
--> /checkout/src/test/ui-fulldeps/session-diagnostic/subdiagnostic-derive.rs:283:7
|
LL | #[bar = "..."]
error: cannot find attribute `bar` in this scope
--> /checkout/src/test/ui-fulldeps/session-diagnostic/subdiagnostic-derive.rs:294:7
|
|
LL | #[bar("...")]
error[E0425]: cannot find value `slug` in module `crate::fluent_generated`
|
|
LL | #[label(slug)]
| ^^^^ not found in `crate::fluent_generated`
error[E0425]: cannot find value `parser_add_paren` in module `crate::fluent_generated`
--> /checkout/src/test/ui-fulldeps/session-diagnostic/subdiagnostic-derive.rs:668:24
|
|
LL | #[multipart_suggestion(parser_add_paren)]
| ^^^^^^^^^^^^^^^^ not found in `crate::fluent_generated`
error[E0425]: cannot find value `parser_add_paren` in module `crate::fluent_generated`
--> /checkout/src/test/ui-fulldeps/session-diagnostic/subdiagnostic-derive.rs:677:24
|
|
LL | #[multipart_suggestion(parser_add_paren)]
| ^^^^^^^^^^^^^^^^ not found in `crate::fluent_generated`
error[E0425]: cannot find value `parser_add_paren` in module `crate::fluent_generated`
--> /checkout/src/test/ui-fulldeps/session-diagnostic/subdiagnostic-derive.rs:686:24
|
|
LL | #[multipart_suggestion(parser_add_paren)]
| ^^^^^^^^^^^^^^^^ not found in `crate::fluent_generated`
error[E0425]: cannot find value `parser_add_paren` in module `crate::fluent_generated`
--> /checkout/src/test/ui-fulldeps/session-diagnostic/subdiagnostic-derive.rs:695:24
|
|
LL | #[multipart_suggestion(parser_add_paren)]
| ^^^^^^^^^^^^^^^^ not found in `crate::fluent_generated`
error[E0425]: cannot find value `parser_add_paren` in module `crate::fluent_generated`
--> /checkout/src/test/ui-fulldeps/session-diagnostic/subdiagnostic-derive.rs:704:24
|
|
LL | #[multipart_suggestion(parser_add_paren)]
| ^^^^^^^^^^^^^^^^ not found in `crate::fluent_generated`
error: aborting due to 77 previous errors
For more information about this error, try `rustc --explain E0425`.
------------------------------------------
------------------------------------------
---- [ui] src/test/ui-fulldeps/session-diagnostic/diagnostic-derive.rs stdout ----
diff of stderr:
574 = help: eager subdiagnostics are not supported on lints
575
576 error: expected at least one string literal for `code(...)`
- --> $DIR/diagnostic-derive.rs:779:18
578 |
578 |
579 LL | #[suggestion(code())]
581
581
582 error: `code(...)` must contain only string literals
- --> $DIR/diagnostic-derive.rs:787:23
584 |
584 |
585 LL | #[suggestion(code(foo))]
587
587
588 error: `code = "..."`/`code(...)` must contain only string literals
- --> $DIR/diagnostic-derive.rs:795:18
590 |
590 |
591 LL | #[suggestion(code = 3)]
651 LL | #[diag(nonsense, code = "E0123")]
652 | ^^^^^^^^ not found in `crate::fluent_generated`
+ error[E0425]: cannot find value `compiletest_example` in module `crate::fluent_generated`
+ --> $DIR/diagnostic-derive.rs:764:8
+ |
+ |
+ LL | #[diag(compiletest_example)]
+ | ^^^^^^^^^^^^^^^^^^^ not found in `crate::fluent_generated`
+ error[E0425]: cannot find value `compiletest_example` in module `crate::fluent_generated`
+ --> $DIR/diagnostic-derive.rs:771:8
+ |
+ |
+ LL | #[diag(compiletest_example)]
+ | ^^^^^^^^^^^^^^^^^^^ not found in `crate::fluent_generated`
+ error[E0425]: cannot find value `compiletest_example` in module `crate::fluent_generated`
+ --> $DIR/diagnostic-derive.rs:778:8
+ |
+ |
+ LL | #[diag(compiletest_example)]
+ | ^^^^^^^^^^^^^^^^^^^ not found in `crate::fluent_generated`
+ error[E0425]: cannot find value `compiletest_example` in module `crate::fluent_generated`
+ --> $DIR/diagnostic-derive.rs:786:8
+ |
+ |
+ LL | #[diag(compiletest_example)]
+ | ^^^^^^^^^^^^^^^^^^^ not found in `crate::fluent_generated`
+ error[E0425]: cannot find value `compiletest_example` in module `crate::fluent_generated`
+ --> $DIR/diagnostic-derive.rs:794:8
+ |
+ |
+ LL | #[diag(compiletest_example)]
+ | ^^^^^^^^^^^^^^^^^^^ not found in `crate::fluent_generated`
+
654 error[E0277]: the trait bound `Hello: IntoDiagnosticArg` is not satisfied
656 |
665 | ^^^^^^^^^^^^^^^^^ required by this bound in `DiagnosticBuilder::<'a, G>::set_arg`
666 = note: this error originates in the derive macro `Diagnostic` (in Nightly builds, run with -Z macro-backtrace for more info)
- error: aborting due to 83 previous errors
+ error: aborting due to 88 previous errors
669
670 Some errors have detailed explanations: E0277, E0425.
---
To only update this specific test, also pass `--test-args session-diagnostic/diagnostic-derive.rs`
error: 1 errors occurred comparing output.
status: exit status: 1
command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui-fulldeps/session-diagnostic/diagnostic-derive.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui-fulldeps/session-diagnostic/diagnostic-derive" "-A" "unused" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui-fulldeps/session-diagnostic/diagnostic-derive/auxiliary"
stdout: none
--- stderr -------------------------------
error: unsupported type attribute for diagnostic derive enum
|
|
LL | #[diag(no_crate_example, code = "E0123")]
error: diagnostic slug not specified
|
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
|
LL | Bar,
| ^^^
|
|
= help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]`
error: `#[diag = ...]` is not a valid attribute
|
|
LL | #[diag = "E0123"]
error: `#[nonsense(...)]` is not a valid attribute
|
|
LL | #[nonsense(no_crate_example, code = "E0123")]
error: diagnostic slug not specified
|
|
LL | / #[nonsense(no_crate_example, code = "E0123")]
LL | | //~^ ERROR `#[nonsense(...)]` is not a valid attribute
LL | | //~^^ ERROR diagnostic slug not specified
LL | | //~^^^ ERROR cannot find attribute `nonsense` in this scope
LL | | struct InvalidStructAttr {}
|
|
= help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]`
error: `#[diag("...")]` is not a valid attribute
|
|
LL | #[diag("E0123")]
|
|
= help: a diagnostic slug is required as the first argument
error: diagnostic slug not specified
|
|
LL | / #[diag("E0123")]
LL | | //~^ ERROR `#[diag("...")]` is not a valid attribute
LL | | //~^^ ERROR diagnostic slug not specified
LL | | struct InvalidLitNestedAttr {}
|
|
= help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]`
error: `#[diag(nonsense(...))]` is not a valid attribute
|
|
LL | #[diag(nonsense("foo"), code = "E0123", slug = "foo")]
|
|
= help: a diagnostic slug is required as the first argument
error: diagnostic slug not specified
|
|
LL | / #[diag(nonsense("foo"), code = "E0123", slug = "foo")]
LL | | //~^ ERROR `#[diag(nonsense(...))]` is not a valid attribute
LL | | //~^^ ERROR diagnostic slug not specified
LL | | struct InvalidNestedStructAttr1 {}
|
|
= help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]`
error: `#[diag(nonsense = ...)]` is not a valid attribute
|
|
LL | #[diag(nonsense = "...", code = "E0123", slug = "foo")]
|
|
= help: only `code` is a valid nested attributes following the slug
error: `#[diag(slug = ...)]` is not a valid attribute
|
|
LL | #[diag(nonsense = "...", code = "E0123", slug = "foo")]
|
|
= help: only `code` is a valid nested attributes following the slug
error: diagnostic slug not specified
|
|
LL | / #[diag(nonsense = "...", code = "E0123", slug = "foo")]
LL | | //~^ ERROR `#[diag(nonsense = ...)]` is not a valid attribute
LL | | //~| ERROR `#[diag(slug = ...)]` is not a valid attribute
LL | | //~| ERROR diagnostic slug not specified
LL | | struct InvalidNestedStructAttr2 {}
|
|
= help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]`
error: `#[diag(nonsense = ...)]` is not a valid attribute
|
|
LL | #[diag(nonsense = 4, code = "E0123", slug = "foo")]
error: `#[diag(slug = ...)]` is not a valid attribute
|
|
LL | #[diag(nonsense = 4, code = "E0123", slug = "foo")]
|
|
= help: only `code` is a valid nested attributes following the slug
error: diagnostic slug not specified
|
|
LL | / #[diag(nonsense = 4, code = "E0123", slug = "foo")]
LL | | //~^ ERROR `#[diag(nonsense = ...)]` is not a valid attribute
LL | | //~| ERROR `#[diag(slug = ...)]` is not a valid attribute
LL | | //~| ERROR diagnostic slug not specified
LL | | struct InvalidNestedStructAttr3 {}
|
|
= help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]`
error: `#[diag(slug = ...)]` is not a valid attribute
|
|
LL | #[diag(no_crate_example, code = "E0123", slug = "foo")]
|
|
= help: only `code` is a valid nested attributes following the slug
error: `#[suggestion = ...]` is not a valid attribute
|
|
LL | #[suggestion = "bar"]
error: specified multiple times
--> /checkout/src/test/ui-fulldeps/session-diagnostic/diagnostic-derive.rs:109:8
|
|
LL | #[diag(no_crate_example, code = "E0456")]
|
note: previously specified here
--> /checkout/src/test/ui-fulldeps/session-diagnostic/diagnostic-derive.rs:108:8
|
|
LL | #[diag(no_crate_example, code = "E0123")]
error: specified multiple times
--> /checkout/src/test/ui-fulldeps/session-diagnostic/diagnostic-derive.rs:109:33
|
|
LL | #[diag(no_crate_example, code = "E0456")]
|
note: previously specified here
--> /checkout/src/test/ui-fulldeps/session-diagnostic/diagnostic-derive.rs:108:33
|
|
LL | #[diag(no_crate_example, code = "E0123")]
error: specified multiple times
--> /checkout/src/test/ui-fulldeps/session-diagnostic/diagnostic-derive.rs:115:49
|
|
LL | #[diag(no_crate_example, code = "E0456", code = "E0457")]
|
note: previously specified here
--> /checkout/src/test/ui-fulldeps/session-diagnostic/diagnostic-derive.rs:115:33
|
|
LL | #[diag(no_crate_example, code = "E0456", code = "E0457")]
error: `#[diag(no_crate::example)]` is not a valid attribute
|
|
LL | #[diag(no_crate_example, no_crate::example, code = "E0456")]
|
|
= help: diagnostic slug must be the first argument
error: diagnostic slug not specified
|
|
LL | struct KindNotProvided {} //~ ERROR diagnostic slug not specified
|
|
= help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]`
error: diagnostic slug not specified
|
|
LL | / #[diag(code = "E0456")]
LL | | //~^ ERROR diagnostic slug not specified
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`
|
|
LL | #[primary_span]
error: `#[nonsense]` is not a valid attribute
|
|
LL | #[nonsense]
error: the `#[label(...)]` attribute can only be applied to fields of type `Span` or `MultiSpan`
|
|
LL | #[label(no_crate_label)]
error: `name` doesn't refer to a field on this type
--> /checkout/src/test/ui-fulldeps/session-diagnostic/diagnostic-derive.rs:172:46
|
|
LL | #[suggestion(no_crate_suggestion, code = "{name}")]
error: invalid format string: expected `'}'` but string was terminated
|
LL | #[derive(Diagnostic)]
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
|
LL | #[derive(Diagnostic)]
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`
|
|
LL | #[label(no_crate_label)]
error: suggestion without `code = "..."`
|
|
LL | #[suggestion(no_crate_suggestion)]
error: `#[suggestion(nonsense = ...)]` is not a valid attribute
|
|
LL | #[suggestion(nonsense = "bar")]
|
|
= help: only `code` and `applicability` are valid nested attributes
error: suggestion without `code = "..."`
|
|
LL | #[suggestion(nonsense = "bar")]
error: `#[suggestion(msg = ...)]` is not a valid attribute
|
|
LL | #[suggestion(msg = "bar")]
|
|
= help: only `code` and `applicability` are valid nested attributes
error: suggestion without `code = "..."`
|
|
LL | #[suggestion(msg = "bar")]
error: wrong field type for suggestion
--> /checkout/src/test/ui-fulldeps/session-diagnostic/diagnostic-derive.rs:265:5
|
|
LL | / #[suggestion(no_crate_suggestion, code = "This is suggested code")]
LL | | //~^ ERROR wrong field type for suggestion
LL | | suggestion: Applicability,
|
|
= help: `#[suggestion(...)]` should be applied to fields of type `Span` or `(Span, Applicability)`
error: specified multiple times
--> /checkout/src/test/ui-fulldeps/session-diagnostic/diagnostic-derive.rs:281:24
|
|
LL | suggestion: (Span, Span, Applicability),
|
note: previously specified here
--> /checkout/src/test/ui-fulldeps/session-diagnostic/diagnostic-derive.rs:281:18
|
|
LL | suggestion: (Span, Span, Applicability),
error: specified multiple times
--> /checkout/src/test/ui-fulldeps/session-diagnostic/diagnostic-derive.rs:289:33
|
|
LL | suggestion: (Applicability, Applicability, Span),
|
note: previously specified here
--> /checkout/src/test/ui-fulldeps/session-diagnostic/diagnostic-derive.rs:289:18
|
|
LL | suggestion: (Applicability, Applicability, Span),
error: `#[label = ...]` is not a valid attribute
|
|
LL | #[label = "bar"]
error: specified multiple times
--> /checkout/src/test/ui-fulldeps/session-diagnostic/diagnostic-derive.rs:447:53
|
|
LL | #[suggestion(no_crate_suggestion, code = "...", applicability = "maybe-incorrect")]
|
note: previously specified here
--> /checkout/src/test/ui-fulldeps/session-diagnostic/diagnostic-derive.rs:449:24
|
|
LL | suggestion: (Span, Applicability),
error: invalid applicability
--> /checkout/src/test/ui-fulldeps/session-diagnostic/diagnostic-derive.rs:455:53
|
|
LL | #[suggestion(no_crate_suggestion, code = "...", applicability = "batman")]
error: `#[label(foo)]` is not a valid attribute
|
|
LL | #[label(no_crate_label, foo)]
|
|
= help: a diagnostic slug must be the first argument to the attribute
error: `#[label(foo = ...)]` is not a valid attribute
|
|
LL | #[label(no_crate_label, foo = "...")]
error: `#[label(foo(...))]` is not a valid attribute
|
|
LL | #[label(no_crate_label, foo("..."))]
error: `#[primary_span]` is not a valid attribute
|
|
LL | #[primary_span]
|
|
= help: the `primary_span` field attribute is not valid for lint diagnostics
error: `#[error(...)]` is not a valid attribute
|
|
LL | #[error(no_crate_example, code = "E0123")]
error: diagnostic slug not specified
|
|
LL | / #[error(no_crate_example, code = "E0123")]
LL | | //~^ ERROR `#[error(...)]` is not a valid attribute
LL | | //~| ERROR diagnostic slug not specified
LL | | //~| ERROR cannot find attribute `error` in this scope
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
|
|
LL | #[warn_(no_crate_example, code = "E0123")]
error: diagnostic slug not specified
|
|
LL | / #[warn_(no_crate_example, code = "E0123")]
LL | | //~^ ERROR `#[warn_(...)]` is not a valid attribute
LL | | //~| ERROR diagnostic slug not specified
LL | | //~| ERROR cannot find attribute `warn_` in this scope
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
|
|
LL | #[lint(no_crate_example, code = "E0123")]
error: diagnostic slug not specified
|
|
LL | / #[lint(no_crate_example, code = "E0123")]
LL | | //~^ ERROR `#[lint(...)]` is not a valid attribute
LL | | //~| ERROR diagnostic slug not specified
LL | | //~| ERROR cannot find attribute `lint` in this scope
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
|
|
LL | #[lint(no_crate_example, code = "E0123")]
error: `#[lint(...)]` is not a valid attribute
|
|
LL | #[lint(no_crate_example, code = "E0123")]
error: diagnostic slug not specified
|
|
LL | / #[lint(no_crate_example, code = "E0123")]
LL | | //~^ ERROR `#[lint(...)]` is not a valid attribute
LL | | //~| ERROR `#[lint(...)]` is not a valid attribute
LL | | //~| ERROR diagnostic slug not specified
LL | | //~| ERROR cannot find attribute `lint` in this scope
LL | | struct LintAttributeOnLintDiag {}
|
|
= help: specify the slug as the first argument to the attribute, such as `#[diag(compiletest_example)]`
error: specified multiple times
--> /checkout/src/test/ui-fulldeps/session-diagnostic/diagnostic-derive.rs:597:53
|
|
LL | #[suggestion(no_crate_suggestion, code = "...", code = ",,,")]
|
note: previously specified here
--> /checkout/src/test/ui-fulldeps/session-diagnostic/diagnostic-derive.rs:597:39
|
|
LL | #[suggestion(no_crate_suggestion, code = "...", code = ",,,")]
error: wrong types for suggestion
--> /checkout/src/test/ui-fulldeps/session-diagnostic/diagnostic-derive.rs:606: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
--> /checkout/src/test/ui-fulldeps/session-diagnostic/diagnostic-derive.rs:614:17
|
|
LL | suggestion: (Span,),
|
|
= help: `#[suggestion(...)]` on a tuple field must be applied to fields of type `(Span, Applicability)`
error: suggestion without `code = "..."`
|
|
LL | #[suggestion(no_crate_suggestion)]
:umbrella: The latest upstream changes (presumably #103623) made this pull request unmergeable. Please resolve the merge conflicts.
:umbrella: The latest upstream changes (presumably #103857) made this pull request unmergeable. Please resolve the merge conflicts.
:umbrella: The latest upstream changes (presumably #103978) made this pull request unmergeable. Please resolve the merge conflicts.
:umbrella: The latest upstream changes (presumably #104179) made this pull request unmergeable. Please resolve the merge conflicts.
:umbrella: The latest upstream changes (presumably #104215) made this pull request unmergeable. Please resolve the merge conflicts.
:umbrella: The latest upstream changes (presumably #104289) made this pull request unmergeable. Please resolve the merge conflicts.
:umbrella: The latest upstream changes (presumably #104091) made this pull request unmergeable. Please resolve the merge conflicts.
:umbrella: The latest upstream changes (presumably #104437) made this pull request unmergeable. Please resolve the merge conflicts.
:umbrella: The latest upstream changes (presumably #104573) made this pull request unmergeable. Please resolve the merge conflicts.
:umbrella: The latest upstream changes (presumably #104120) made this pull request unmergeable. Please resolve the merge conflicts.
:umbrella: The latest upstream changes (presumably #103578) made this pull request unmergeable. Please resolve the merge conflicts.
:umbrella: The latest upstream changes (presumably #104758) made this pull request unmergeable. Please resolve the merge conflicts.
:umbrella: The latest upstream changes (presumably #105017) made this pull request unmergeable. Please resolve the merge conflicts.
@davidtwco are there any blockers left for this PR?
Tests have moved from src/test
to tests
, please rebase on top of new master
.
@rustbot author
@rustbot label -A-bootstrap
Some changes occurred in src/tools/clippy
cc @rust-lang/clippy
rustc_errors::translation
was changed
cc @davidtwco, @compiler-errors, @JohnTitor, @estebank, @TaKO8Ki
rustc_error_messages
was changed
cc @davidtwco, @compiler-errors, @JohnTitor, @estebank, @TaKO8Ki
Some changes occurred in compiler/rustc_codegen_cranelift
cc @bjorn3
rustc_macros::diagnostics
was changed
cc @davidtwco, @compiler-errors, @JohnTitor, @estebank, @TaKO8Ki
Some changes occurred in compiler/rustc_codegen_gcc
cc @antoyo
Some changes occurred in src/tools/rustfmt
cc @rust-lang/rustfmt
These commits modify the Cargo.lock
file. Random changes to Cargo.lock
can be introduced when switching branches and rebasing PRs.
This was probably unintentional and should be reverted before this PR is merged.
If this was intentional then you can ignore this comment.
The job x86_64-gnu-llvm-13
failed! Check out the build log: (web) (plain)
Click to see the possible cause of the failure (guessed by this bot)
Prepare all required actions
Getting action download info
Download action repository 'actions/checkout@v3' (SHA:ac593985615ec2ede58e132d2e21d2b1cbd6127c)
Download action repository 'rust-lang/simpleinfra@master' (SHA:b9dd95b10bcfe24d57bf54db874f81a7c8315a80)
Complete job name: PR (x86_64-gnu-llvm-13, false, ubuntu-20.04-xl)
git config --global core.autocrlf false
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
env:
CI_JOB_NAME: x86_64-gnu-llvm-13
---
diff of stderr:
502 | ^^^^^^^^^^^^
503
504 error: `#[primary_span]` is not a valid attribute
- --> $DIR/subdiagnostic-derive.rs:806:5
506 |
506 |
507 LL | #[primary_span]
511 = help: to create a suggestion with multiple spans, use `#[multipart_suggestion]` instead
512
513 error: suggestion without `#[primary_span]` field
- --> $DIR/subdiagnostic-derive.rs:803:1
515 |
515 |
516 LL | / #[suggestion(parse_add_paren, code = "")]
517 LL | |
582 LL | #[label(slug)]
583 | ^^^^ not found in `crate::fluent_generated`
- error: aborting due to 81 previous errors
+ error[E0425]: cannot find value `parse_add_paren` in module `crate::fluent_generated`
+ --> $DIR/subdiagnostic-derive.rs:805:14
+ |
+ |
+ LL | #[suggestion(parse_add_paren, code = "")]
+ | ^^^^^^^^^^^^^^^ not found in `crate::fluent_generated`
+ error: aborting due to 82 previous errors
586
587 For more information about this error, try `rustc --explain E0425`.
588
---
To only update this specific test, also pass `--test-args session-diagnostic/subdiagnostic-derive.rs`
error: 1 errors occurred comparing output.
status: exit status: 1
command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui-fulldeps/session-diagnostic/subdiagnostic-derive.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Zdeduplicate-diagnostics=no" "-Cstrip=debuginfo" "--remap-path-prefix=/checkout/tests/ui-fulldeps=fake-test-src-base" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui-fulldeps/session-diagnostic/subdiagnostic-derive" "-A" "unused" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui-fulldeps/session-diagnostic/subdiagnostic-derive/auxiliary"
stdout: none
--- stderr -------------------------------
error: label without `#[primary_span]` field
--> fake-test-src-base/session-diagnostic/subdiagnostic-derive.rs:49:1
|
LL | / #[label(no_crate_example)]
LL | | //~^ ERROR label without `#[primary_span]` field
LL | | struct C {
LL | | var: String,
LL | | }
error: diagnostic slug must be first argument of a `#[label(...)]` attribute
--> fake-test-src-base/session-diagnostic/subdiagnostic-derive.rs:56:1
LL | #[label]
| ^^^^^^^^
error: `#[foo]` is not a valid attribute
--> fake-test-src-base/session-diagnostic/subdiagnostic-derive.rs:65:1
LL | #[foo]
| ^^^^^^
error: `#[label = ...]` is not a valid attribute
--> fake-test-src-base/session-diagnostic/subdiagnostic-derive.rs:75:1
|
LL | #[label = "..."]
error: `#[label(bug = ...)]` is not a valid attribute
--> fake-test-src-base/session-diagnostic/subdiagnostic-derive.rs:84:9
|
LL | #[label(bug = "...")]
error: diagnostic slug must be first argument of a `#[label(...)]` attribute
--> fake-test-src-base/session-diagnostic/subdiagnostic-derive.rs:84:1
|
LL | #[label(bug = "...")]
error: `#[label("...")]` is not a valid attribute
--> fake-test-src-base/session-diagnostic/subdiagnostic-derive.rs:94:9
|
LL | #[label("...")]
error: diagnostic slug must be first argument of a `#[label(...)]` attribute
--> fake-test-src-base/session-diagnostic/subdiagnostic-derive.rs:94:1
|
LL | #[label("...")]
error: `#[label(slug = ...)]` is not a valid attribute
--> fake-test-src-base/session-diagnostic/subdiagnostic-derive.rs:104:9
|
LL | #[label(slug = 4)]
error: diagnostic slug must be first argument of a `#[label(...)]` attribute
--> fake-test-src-base/session-diagnostic/subdiagnostic-derive.rs:104:1
|
LL | #[label(slug = 4)]
error: `#[label(slug(...))]` is not a valid attribute
--> fake-test-src-base/session-diagnostic/subdiagnostic-derive.rs:114:9
|
LL | #[label(slug("..."))]
error: diagnostic slug must be first argument of a `#[label(...)]` attribute
--> fake-test-src-base/session-diagnostic/subdiagnostic-derive.rs:114:1
|
LL | #[label(slug("..."))]
error: diagnostic slug must be first argument of a `#[label(...)]` attribute
--> fake-test-src-base/session-diagnostic/subdiagnostic-derive.rs:134:1
|
LL | #[label()]
error: `#[label(code = ...)]` is not a valid attribute
--> fake-test-src-base/session-diagnostic/subdiagnostic-derive.rs:143:27
|
LL | #[label(no_crate_example, code = "...")]
error: `#[label(applicability = ...)]` is not a valid attribute
--> fake-test-src-base/session-diagnostic/subdiagnostic-derive.rs:152:27
|
LL | #[label(no_crate_example, applicability = "machine-applicable")]
error: unsupported type attribute for subdiagnostic enum
--> fake-test-src-base/session-diagnostic/subdiagnostic-derive.rs:161:1
|
|
LL | #[foo]
| ^^^^^^
error: `#[bar]` is not a valid attribute
--> fake-test-src-base/session-diagnostic/subdiagnostic-derive.rs:175:5
LL | #[bar]
| ^^^^^^
error: `#[bar = ...]` is not a valid attribute
--> fake-test-src-base/session-diagnostic/subdiagnostic-derive.rs:187:5
|
LL | #[bar = "..."]
error: `#[bar = ...]` is not a valid attribute
--> fake-test-src-base/session-diagnostic/subdiagnostic-derive.rs:199:5
|
LL | #[bar = 4]
error: `#[bar(...)]` is not a valid attribute
--> fake-test-src-base/session-diagnostic/subdiagnostic-derive.rs:211:5
|
LL | #[bar("...")]
error: `#[label(code = ...)]` is not a valid attribute
--> fake-test-src-base/session-diagnostic/subdiagnostic-derive.rs:223:13
|
LL | #[label(code = "...")]
error: diagnostic slug must be first argument of a `#[label(...)]` attribute
--> fake-test-src-base/session-diagnostic/subdiagnostic-derive.rs:223:5
|
LL | #[label(code = "...")]
error: the `#[primary_span]` attribute can only be applied to fields of type `Span` or `MultiSpan`
--> fake-test-src-base/session-diagnostic/subdiagnostic-derive.rs:252:5
|
LL | #[primary_span]
error: label without `#[primary_span]` field
--> fake-test-src-base/session-diagnostic/subdiagnostic-derive.rs:249:1
|
LL | / #[label(no_crate_example)]
LL | | //~^ ERROR label without `#[primary_span]` field
LL | | struct W {
LL | | #[primary_span]
LL | | //~^ ERROR the `#[primary_span]` attribute can only be applied to fields of type `Span` or `MultiSpan`
LL | | span: String,
LL | | }
error: `#[applicability]` is only valid on suggestions
--> fake-test-src-base/session-diagnostic/subdiagnostic-derive.rs:262:5
LL | #[applicability]
| ^^^^^^^^^^^^^^^^
error: `#[bar]` is not a valid attribute
--> fake-test-src-base/session-diagnostic/subdiagnostic-derive.rs:272:5
LL | #[bar]
| ^^^^^^
|
|
= help: only `primary_span`, `applicability` and `skip_arg` are valid field attributes
error: `#[bar = ...]` is not a valid attribute
--> fake-test-src-base/session-diagnostic/subdiagnostic-derive.rs:283:5
|
LL | #[bar = "..."]
error: `#[bar(...)]` is not a valid attribute
--> fake-test-src-base/session-diagnostic/subdiagnostic-derive.rs:294:5
|
LL | #[bar("...")]
|
|
= help: only `primary_span`, `applicability` and `skip_arg` are valid field attributes
error: unexpected unsupported untagged union
--> fake-test-src-base/session-diagnostic/subdiagnostic-derive.rs:310:1
|
|
LL | / union AC {
LL | | //~^ ERROR unexpected unsupported untagged union
LL | | span: u32,
LL | | b: u64,
LL | | }
error: `#[label(no_crate::example)]` is not a valid attribute
--> fake-test-src-base/session-diagnostic/subdiagnostic-derive.rs:325:27
|
LL | #[label(no_crate_example, no_crate::example)]
|
|
= help: a diagnostic slug must be the first argument to the attribute
error: specified multiple times
--> fake-test-src-base/session-diagnostic/subdiagnostic-derive.rs:338:5
|
|
LL | #[primary_span]
|
note: previously specified here
--> fake-test-src-base/session-diagnostic/subdiagnostic-derive.rs:335:5
|
|
LL | #[primary_span]
error: subdiagnostic kind not specified
--> fake-test-src-base/session-diagnostic/subdiagnostic-derive.rs:344:8
LL | struct AG {
| ^^
error: specified multiple times
error: specified multiple times
--> fake-test-src-base/session-diagnostic/subdiagnostic-derive.rs:381:46
|
LL | #[suggestion(no_crate_example, code = "...", code = "...")]
|
note: previously specified here
--> fake-test-src-base/session-diagnostic/subdiagnostic-derive.rs:381:32
|
|
LL | #[suggestion(no_crate_example, code = "...", code = "...")]
error: specified multiple times
--> fake-test-src-base/session-diagnostic/subdiagnostic-derive.rs:399:5
|
---
|
LL | #[applicability]
| ^^^^^^^^^^^^^^^^
error: the `#[applicability]` attribute can only be applied to fields of type `Applicability`
--> fake-test-src-base/session-diagnostic/subdiagnostic-derive.rs:409:5
LL | #[applicability]
| ^^^^^^^^^^^^^^^^
error: suggestion without `code = "..."`
--> fake-test-src-base/session-diagnostic/subdiagnostic-derive.rs:422:1
|
LL | #[suggestion(no_crate_example)]
error: invalid applicability
--> fake-test-src-base/session-diagnostic/subdiagnostic-derive.rs:432:46
|
|
LL | #[suggestion(no_crate_example, code = "...", applicability = "foo")]
error: suggestion without `#[primary_span]` field
--> fake-test-src-base/session-diagnostic/subdiagnostic-derive.rs:450:1
|
LL | / #[suggestion(no_crate_example, code = "...")]
LL | | //~^ ERROR suggestion without `#[primary_span]` field
LL | | struct AR {
LL | | var: String,
LL | | }
error: unsupported type attribute for subdiagnostic enum
--> fake-test-src-base/session-diagnostic/subdiagnostic-derive.rs:464:1
|
|
LL | #[label]
| ^^^^^^^^
error: `var` doesn't refer to a field on this type
--> fake-test-src-base/session-diagnostic/subdiagnostic-derive.rs:484:39
|
LL | #[suggestion(no_crate_example, code = "{var}", applicability = "machine-applicable")]
error: `var` doesn't refer to a field on this type
--> fake-test-src-base/session-diagnostic/subdiagnostic-derive.rs:503:43
|
LL | #[suggestion(no_crate_example, code = "{var}", applicability = "machine-applicable")]
error: `#[suggestion_part]` is not a valid attribute
--> fake-test-src-base/session-diagnostic/subdiagnostic-derive.rs:526:5
LL | #[suggestion_part]
| ^^^^^^^^^^^^^^^^^^
|
|
= help: `#[suggestion_part(...)]` is only valid in multipart suggestions, use `#[primary_span]` instead
error: `#[suggestion_part(...)]` is not a valid attribute
--> fake-test-src-base/session-diagnostic/subdiagnostic-derive.rs:529:5
|
LL | #[suggestion_part(code = "...")]
|
|
= help: `#[suggestion_part(...)]` is only valid in multipart suggestions
error: suggestion without `#[primary_span]` field
--> fake-test-src-base/session-diagnostic/subdiagnostic-derive.rs:523:1
|
LL | / #[suggestion(no_crate_example, code = "...")]
LL | | //~^ ERROR suggestion without `#[primary_span]` field
LL | | struct BA {
LL | | #[suggestion_part]
LL | | var: String,
LL | | }
| |_^
error: `#[multipart_suggestion(code = ...)]` is not a valid attribute
--> fake-test-src-base/session-diagnostic/subdiagnostic-derive.rs:538:42
|
LL | #[multipart_suggestion(no_crate_example, code = "...", applicability = "machine-applicable")]
|
|
= help: only `style` and `applicability` are valid nested attributes
error: multipart suggestion without any `#[suggestion_part(...)]` fields
--> fake-test-src-base/session-diagnostic/subdiagnostic-derive.rs:538:1
|
LL | / #[multipart_suggestion(no_crate_example, code = "...", applicability = "machine-applicable")]
LL | | //~^ ERROR multipart suggestion without any `#[suggestion_part(...)]` fields
LL | | //~| ERROR `#[multipart_suggestion(code = ...)]` is not a valid attribute
LL | | struct BBa {
LL | | var: String,
LL | | }
error: `#[suggestion_part(...)]` attribute without `code = "..."`
--> fake-test-src-base/session-diagnostic/subdiagnostic-derive.rs:548:5
LL | #[suggestion_part]
| ^^^^^^^^^^^^^^^^^^
error: `#[suggestion_part(...)]` attribute without `code = "..."`
--> fake-test-src-base/session-diagnostic/subdiagnostic-derive.rs:556:5
|
LL | #[suggestion_part()]
error: `#[primary_span]` is not a valid attribute
--> fake-test-src-base/session-diagnostic/subdiagnostic-derive.rs:565:5
|
LL | #[primary_span]
|
|
= help: multipart suggestions use one or more `#[suggestion_part]`s rather than one `#[primary_span]`
error: multipart suggestion without any `#[suggestion_part(...)]` fields
--> fake-test-src-base/session-diagnostic/subdiagnostic-derive.rs:562:1
|
LL | / #[multipart_suggestion(no_crate_example)]
LL | | //~^ ERROR multipart suggestion without any `#[suggestion_part(...)]` fields
LL | | struct BC {
LL | | #[primary_span]
LL | | //~^ ERROR `#[primary_span]` is not a valid attribute
LL | | span: Span,
LL | | }
error: `#[suggestion_part(...)]` attribute without `code = "..."`
--> fake-test-src-base/session-diagnostic/subdiagnostic-derive.rs:573:5
LL | #[suggestion_part]
| ^^^^^^^^^^^^^^^^^^
error: `#[suggestion_part(...)]` attribute without `code = "..."`
--> fake-test-src-base/session-diagnostic/subdiagnostic-derive.rs:576:5
|
LL | #[suggestion_part()]
error: `#[suggestion_part(foo = ...)]` is not a valid attribute
--> fake-test-src-base/session-diagnostic/subdiagnostic-derive.rs:579:23
|
LL | #[suggestion_part(foo = "bar")]
|
|
= help: `code` is the only valid nested attribute
error: the `#[suggestion_part(...)]` attribute can only be applied to fields of type `Span` or `MultiSpan`
--> fake-test-src-base/session-diagnostic/subdiagnostic-derive.rs:582:5
|
LL | #[suggestion_part(code = "...")]
error: the `#[suggestion_part(...)]` attribute can only be applied to fields of type `Span` or `MultiSpan`
--> fake-test-src-base/session-diagnostic/subdiagnostic-derive.rs:585:5
|
LL | #[suggestion_part()]
error: specified multiple times
--> fake-test-src-base/session-diagnostic/subdiagnostic-derive.rs:593:37
|
|
LL | #[suggestion_part(code = "...", code = ",,,")]
|
note: previously specified here
--> fake-test-src-base/session-diagnostic/subdiagnostic-derive.rs:593:23
|
|
LL | #[suggestion_part(code = "...", code = ",,,")]
error: `#[applicability]` has no effect if all `#[suggestion]`/`#[multipart_suggestion]` attributes have a static `applicability = "..."`
--> fake-test-src-base/session-diagnostic/subdiagnostic-derive.rs:622:5
LL | #[applicability]
| ^^^^^^^^^^^^^^^^
error: expected exactly one string literal for `code = ...`
--> fake-test-src-base/session-diagnostic/subdiagnostic-derive.rs:670:23
|
LL | #[suggestion_part(code("foo"))]
error: expected exactly one string literal for `code = ...`
--> fake-test-src-base/session-diagnostic/subdiagnostic-derive.rs:679:23
|
LL | #[suggestion_part(code("foo", "bar"))]
error: expected exactly one string literal for `code = ...`
--> fake-test-src-base/session-diagnostic/subdiagnostic-derive.rs:688:23
|
LL | #[suggestion_part(code(3))]
error: expected exactly one string literal for `code = ...`
--> fake-test-src-base/session-diagnostic/subdiagnostic-derive.rs:697:23
|
LL | #[suggestion_part(code())]
error: `code = "..."`/`code(...)` must contain only string literals
--> fake-test-src-base/session-diagnostic/subdiagnostic-derive.rs:706:23
|
LL | #[suggestion_part(code = 3)]
error: specified multiple times
--> fake-test-src-base/session-diagnostic/subdiagnostic-derive.rs:748:61
|
|
LL | #[suggestion(no_crate_example, code = "", style = "hidden", style = "normal")]
|
note: previously specified here
--> fake-test-src-base/session-diagnostic/subdiagnostic-derive.rs:748:43
|
|
LL | #[suggestion(no_crate_example, code = "", style = "hidden", style = "normal")]
error: `#[suggestion_hidden(...)]` is not a valid attribute
--> fake-test-src-base/session-diagnostic/subdiagnostic-derive.rs:757:1
|
LL | #[suggestion_hidden(no_crate_example, code = "")]
|
|
= help: Use `#[suggestion(..., style = "hidden")]` instead
error: `#[suggestion_hidden(...)]` is not a valid attribute
--> fake-test-src-base/session-diagnostic/subdiagnostic-derive.rs:765:1
|
LL | #[suggestion_hidden(no_crate_example, code = "", style = "normal")]
|
|
= help: Use `#[suggestion(..., style = "hidden")]` instead
error: invalid suggestion style
--> fake-test-src-base/session-diagnostic/subdiagnostic-derive.rs:773:51
|
|
LL | #[suggestion(no_crate_example, code = "", style = "foo")]
|
|
= help: valid styles are `normal`, `short`, `hidden`, `verbose` and `tool-only`
error: `#[suggestion(style = ...)]` is not a valid attribute
--> fake-test-src-base/session-diagnostic/subdiagnostic-derive.rs:781:43
|
LL | #[suggestion(no_crate_example, code = "", style = 42)]
error: `#[suggestion(style)]` is not a valid attribute
--> fake-test-src-base/session-diagnostic/subdiagnostic-derive.rs:789:43
|
LL | #[suggestion(no_crate_example, code = "", style)]
|
|
= help: a diagnostic slug must be the first argument to the attribute
error: `#[suggestion(style(...))]` is not a valid attribute
--> fake-test-src-base/session-diagnostic/subdiagnostic-derive.rs:797:43
|
LL | #[suggestion(no_crate_example, code = "", style("foo"))]
error: `#[primary_span]` is not a valid attribute
--> fake-test-src-base/session-diagnostic/subdiagnostic-derive.rs:808:5
|
LL | #[primary_span]
|
= note: there must be exactly one primary span
= note: there must be exactly one primary span
= help: to create a suggestion with multiple spans, use `#[multipart_suggestion]` instead
error: suggestion without `#[primary_span]` field
--> fake-test-src-base/session-diagnostic/subdiagnostic-derive.rs:805:1
|
LL | / #[suggestion(parse_add_paren, code = "")]
LL | | //~^ ERROR suggestion without `#[primary_span]` field
LL | | struct PrimarySpanOnVec {
LL | | #[primary_span]
... |
LL | | sub: Vec<Span>,
LL | | }
error: cannot find attribute `foo` in this scope
--> fake-test-src-base/session-diagnostic/subdiagnostic-derive.rs:65:3
|
---
error: cannot find attribute `bar` in this scope
--> fake-test-src-base/session-diagnostic/subdiagnostic-derive.rs:187:7
|
LL | #[bar = "..."]
error: cannot find attribute `bar` in this scope
--> fake-test-src-base/session-diagnostic/subdiagnostic-derive.rs:199:7
|
|
LL | #[bar = 4]
error: cannot find attribute `bar` in this scope
--> fake-test-src-base/session-diagnostic/subdiagnostic-derive.rs:211:7
|
|
LL | #[bar("...")]
error: cannot find attribute `bar` in this scope
--> fake-test-src-base/session-diagnostic/subdiagnostic-derive.rs:272:7
|
|
LL | #[bar]
| ^^^
error: cannot find attribute `bar` in this scope
--> fake-test-src-base/session-diagnostic/subdiagnostic-derive.rs:283:7
|
LL | #[bar = "..."]
error: cannot find attribute `bar` in this scope
--> fake-test-src-base/session-diagnostic/subdiagnostic-derive.rs:294:7
|
|
LL | #[bar("...")]
error[E0425]: cannot find value `slug` in module `crate::fluent_generated`
--> fake-test-src-base/session-diagnostic/subdiagnostic-derive.rs:124:9
|
LL | #[label(slug)]
| ^^^^ not found in `crate::fluent_generated`
error[E0425]: cannot find value `parse_add_paren` in module `crate::fluent_generated`
--> fake-test-src-base/session-diagnostic/subdiagnostic-derive.rs:805:14
|
|
LL | #[suggestion(parse_add_paren, code = "")]
| ^^^^^^^^^^^^^^^ not found in `crate::fluent_generated`
error: aborting due to 82 previous errors
For more information about this error, try `rustc --explain E0425`.
------------------------------------------
------------------------------------------
---- [ui] tests/ui-fulldeps/session-diagnostic/diagnostic-derive.rs stdout ----
diff of stderr:
590 | ^^^^^^^^
591
592 error: `#[suggestion(...)]` is not a valid attribute
- --> $DIR/diagnostic-derive.rs:806:5
594 |
594 |
595 LL | #[suggestion(suggestion, code = "")]
659 LL | #[diag(nonsense, code = "E0123")]
660 | ^^^^^^^^ not found in `crate::fluent_generated`
+ error[E0425]: cannot find value `compiletest_example` in module `crate::fluent_generated`
+ --> $DIR/diagnostic-derive.rs:806:8
+ |
+ |
+ LL | #[diag(compiletest_example)]
+ | ^^^^^^^^^^^^^^^^^^^ not found in `crate::fluent_generated`
+
662 error[E0277]: the trait bound `Hello: IntoDiagnosticArg` is not satisfied
664 |
670 --> $COMPILER_DIR/rustc_errors/src/diagnostic_builder.rs:LL:CC
671 = 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
+ error: aborting due to 85 previous errors
674
675 Some errors have detailed explanations: E0277, E0425.
---
To only update this specific test, also pass `--test-args session-diagnostic/diagnostic-derive.rs`
error: 1 errors occurred comparing output.
status: exit status: 1
command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Zdeduplicate-diagnostics=no" "-Cstrip=debuginfo" "--remap-path-prefix=/checkout/tests/ui-fulldeps=fake-test-src-base" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui-fulldeps/session-diagnostic/diagnostic-derive" "-A" "unused" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui-fulldeps/session-diagnostic/diagnostic-derive/auxiliary"
stdout: none
--- stderr -------------------------------
error: unsupported type attribute for diagnostic derive enum
--> fake-test-src-base/session-diagnostic/diagnostic-derive.rs:41:1
|
LL | #[diag(no_crate_example, code = "E0123")]
error: diagnostic slug not specified
--> fake-test-src-base/session-diagnostic/diagnostic-derive.rs:44: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
--> fake-test-src-base/session-diagnostic/diagnostic-derive.rs:46:5
LL | Bar,
| ^^^
|
|
= help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]`
error: `#[diag = ...]` is not a valid attribute
--> fake-test-src-base/session-diagnostic/diagnostic-derive.rs:52:1
|
LL | #[diag = "E0123"]
error: `#[nonsense(...)]` is not a valid attribute
--> fake-test-src-base/session-diagnostic/diagnostic-derive.rs:57:1
|
LL | #[nonsense(no_crate_example, code = "E0123")]
error: diagnostic slug not specified
--> fake-test-src-base/session-diagnostic/diagnostic-derive.rs:57:1
|
LL | / #[nonsense(no_crate_example, code = "E0123")]
LL | | //~^ ERROR `#[nonsense(...)]` is not a valid attribute
LL | | //~^^ ERROR diagnostic slug not specified
LL | | //~^^^ ERROR cannot find attribute `nonsense` in this scope
LL | | struct InvalidStructAttr {}
|
|
= help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]`
error: `#[diag("...")]` is not a valid attribute
--> fake-test-src-base/session-diagnostic/diagnostic-derive.rs:64:8
|
LL | #[diag("E0123")]
|
= help: a diagnostic slug is required as the first argument
error: diagnostic slug not specified
--> fake-test-src-base/session-diagnostic/diagnostic-derive.rs:64:1
|
LL | / #[diag("E0123")]
LL | | //~^ ERROR `#[diag("...")]` is not a valid attribute
LL | | //~^^ ERROR diagnostic slug not specified
LL | | struct InvalidLitNestedAttr {}
|
|
= help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]`
error: `#[diag(nonsense(...))]` is not a valid attribute
--> fake-test-src-base/session-diagnostic/diagnostic-derive.rs:75:8
|
LL | #[diag(nonsense("foo"), code = "E0123", slug = "foo")]
|
= help: a diagnostic slug is required as the first argument
error: diagnostic slug not specified
--> fake-test-src-base/session-diagnostic/diagnostic-derive.rs:75:1
|
LL | / #[diag(nonsense("foo"), code = "E0123", slug = "foo")]
LL | | //~^ ERROR `#[diag(nonsense(...))]` is not a valid attribute
LL | | //~^^ ERROR diagnostic slug not specified
LL | | struct InvalidNestedStructAttr1 {}
|
|
= help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]`
error: `#[diag(nonsense = ...)]` is not a valid attribute
--> fake-test-src-base/session-diagnostic/diagnostic-derive.rs:81:8
|
LL | #[diag(nonsense = "...", code = "E0123", slug = "foo")]
|
|
= help: only `code` is a valid nested attributes following the slug
error: `#[diag(slug = ...)]` is not a valid attribute
--> fake-test-src-base/session-diagnostic/diagnostic-derive.rs:81:42
|
LL | #[diag(nonsense = "...", code = "E0123", slug = "foo")]
|
|
= help: only `code` is a valid nested attributes following the slug
error: diagnostic slug not specified
--> fake-test-src-base/session-diagnostic/diagnostic-derive.rs:81:1
|
LL | / #[diag(nonsense = "...", code = "E0123", slug = "foo")]
LL | | //~^ ERROR `#[diag(nonsense = ...)]` is not a valid attribute
LL | | //~| ERROR `#[diag(slug = ...)]` is not a valid attribute
LL | | //~| ERROR diagnostic slug not specified
LL | | struct InvalidNestedStructAttr2 {}
|
|
= help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]`
error: `#[diag(nonsense = ...)]` is not a valid attribute
--> fake-test-src-base/session-diagnostic/diagnostic-derive.rs:88:8
|
LL | #[diag(nonsense = 4, code = "E0123", slug = "foo")]
error: `#[diag(slug = ...)]` is not a valid attribute
--> fake-test-src-base/session-diagnostic/diagnostic-derive.rs:88:38
|
LL | #[diag(nonsense = 4, code = "E0123", slug = "foo")]
|
|
= help: only `code` is a valid nested attributes following the slug
error: diagnostic slug not specified
--> fake-test-src-base/session-diagnostic/diagnostic-derive.rs:88:1
|
LL | / #[diag(nonsense = 4, code = "E0123", slug = "foo")]
LL | | //~^ ERROR `#[diag(nonsense = ...)]` is not a valid attribute
LL | | //~| ERROR `#[diag(slug = ...)]` is not a valid attribute
LL | | //~| ERROR diagnostic slug not specified
LL | | struct InvalidNestedStructAttr3 {}
|
|
= help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]`
error: `#[diag(slug = ...)]` is not a valid attribute
--> fake-test-src-base/session-diagnostic/diagnostic-derive.rs:95:42
|
LL | #[diag(no_crate_example, code = "E0123", slug = "foo")]
|
|
= help: only `code` is a valid nested attributes following the slug
error: `#[suggestion = ...]` is not a valid attribute
--> fake-test-src-base/session-diagnostic/diagnostic-derive.rs:102:5
|
LL | #[suggestion = "bar"]
error: specified multiple times
--> fake-test-src-base/session-diagnostic/diagnostic-derive.rs:109:8
|
|
LL | #[diag(no_crate_example, code = "E0456")]
|
note: previously specified here
--> fake-test-src-base/session-diagnostic/diagnostic-derive.rs:108:8
|
|
LL | #[diag(no_crate_example, code = "E0123")]
error: specified multiple times
--> fake-test-src-base/session-diagnostic/diagnostic-derive.rs:109:33
|
|
LL | #[diag(no_crate_example, code = "E0456")]
|
note: previously specified here
--> fake-test-src-base/session-diagnostic/diagnostic-derive.rs:108:33
|
|
LL | #[diag(no_crate_example, code = "E0123")]
error: specified multiple times
--> fake-test-src-base/session-diagnostic/diagnostic-derive.rs:115:49
|
|
LL | #[diag(no_crate_example, code = "E0456", code = "E0457")]
|
note: previously specified here
--> fake-test-src-base/session-diagnostic/diagnostic-derive.rs:115:33
|
|
LL | #[diag(no_crate_example, code = "E0456", code = "E0457")]
error: `#[diag(no_crate::example)]` is not a valid attribute
--> fake-test-src-base/session-diagnostic/diagnostic-derive.rs:120:26
|
LL | #[diag(no_crate_example, no_crate::example, code = "E0456")]
|
|
= help: diagnostic slug must be the first argument
error: diagnostic slug not specified
--> fake-test-src-base/session-diagnostic/diagnostic-derive.rs:125:1
|
LL | struct KindNotProvided {} //~ ERROR diagnostic slug not specified
|
|
= help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]`
error: diagnostic slug not specified
--> fake-test-src-base/session-diagnostic/diagnostic-derive.rs:128:1
|
LL | / #[diag(code = "E0456")]
LL | | //~^ ERROR diagnostic slug not specified
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`
--> fake-test-src-base/session-diagnostic/diagnostic-derive.rs:139:5
|
LL | #[primary_span]
error: `#[nonsense]` is not a valid attribute
--> fake-test-src-base/session-diagnostic/diagnostic-derive.rs:147:5
|
LL | #[nonsense]
error: the `#[label(...)]` attribute can only be applied to fields of type `Span` or `MultiSpan`
--> fake-test-src-base/session-diagnostic/diagnostic-derive.rs:164:5
|
LL | #[label(no_crate_label)]
error: `name` doesn't refer to a field on this type
--> fake-test-src-base/session-diagnostic/diagnostic-derive.rs:172:46
|
|
LL | #[suggestion(no_crate_suggestion, code = "{name}")]
error: invalid format string: expected `'}'` but string was terminated
--> fake-test-src-base/session-diagnostic/diagnostic-derive.rs:177:10
LL | #[derive(Diagnostic)]
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
--> fake-test-src-base/session-diagnostic/diagnostic-derive.rs:187:10
LL | #[derive(Diagnostic)]
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`
--> fake-test-src-base/session-diagnostic/diagnostic-derive.rs:207:5
|
LL | #[label(no_crate_label)]
error: suggestion without `code = "..."`
--> fake-test-src-base/session-diagnostic/diagnostic-derive.rs:226:5
|
LL | #[suggestion(no_crate_suggestion)]
error: `#[suggestion(nonsense = ...)]` is not a valid attribute
--> fake-test-src-base/session-diagnostic/diagnostic-derive.rs:234:18
|
LL | #[suggestion(nonsense = "bar")]
|
|
= help: only `style`, `code` and `applicability` are valid nested attributes
error: suggestion without `code = "..."`
--> fake-test-src-base/session-diagnostic/diagnostic-derive.rs:234:5
|
LL | #[suggestion(nonsense = "bar")]
error: `#[suggestion(msg = ...)]` is not a valid attribute
--> fake-test-src-base/session-diagnostic/diagnostic-derive.rs:243:18
|
LL | #[suggestion(msg = "bar")]
|
|
= help: only `style`, `code` and `applicability` are valid nested attributes
error: suggestion without `code = "..."`
--> fake-test-src-base/session-diagnostic/diagnostic-derive.rs:243:5
|
LL | #[suggestion(msg = "bar")]
error: wrong field type for suggestion
--> fake-test-src-base/session-diagnostic/diagnostic-derive.rs:266:5
|
|
LL | / #[suggestion(no_crate_suggestion, code = "This is suggested code")]
LL | | //~^ ERROR wrong field type for suggestion
LL | | suggestion: Applicability,
|
|
= help: `#[suggestion(...)]` should be applied to fields of type `Span` or `(Span, Applicability)`
error: specified multiple times
--> fake-test-src-base/session-diagnostic/diagnostic-derive.rs:282:24
|
|
LL | suggestion: (Span, Span, Applicability),
|
note: previously specified here
--> fake-test-src-base/session-diagnostic/diagnostic-derive.rs:282:18
|
|
LL | suggestion: (Span, Span, Applicability),
error: specified multiple times
--> fake-test-src-base/session-diagnostic/diagnostic-derive.rs:290:33
|
|
LL | suggestion: (Applicability, Applicability, Span),
|
note: previously specified here
--> fake-test-src-base/session-diagnostic/diagnostic-derive.rs:290:18
|
|
LL | suggestion: (Applicability, Applicability, Span),
error: `#[label = ...]` is not a valid attribute
--> fake-test-src-base/session-diagnostic/diagnostic-derive.rs:297:5
|
LL | #[label = "bar"]
error: specified multiple times
--> fake-test-src-base/session-diagnostic/diagnostic-derive.rs:448:53
|
|
LL | #[suggestion(no_crate_suggestion, code = "...", applicability = "maybe-incorrect")]
|
note: previously specified here
--> fake-test-src-base/session-diagnostic/diagnostic-derive.rs:450:24
|
|
LL | suggestion: (Span, Applicability),
error: invalid applicability
--> fake-test-src-base/session-diagnostic/diagnostic-derive.rs:456:53
|
|
LL | #[suggestion(no_crate_suggestion, code = "...", applicability = "batman")]
error: `#[label(foo)]` is not a valid attribute
--> fake-test-src-base/session-diagnostic/diagnostic-derive.rs:519:29
|
LL | #[label(no_crate_label, foo)]
|
|
= help: a diagnostic slug must be the first argument to the attribute
error: `#[label(foo = ...)]` is not a valid attribute
--> fake-test-src-base/session-diagnostic/diagnostic-derive.rs:527:29
|
LL | #[label(no_crate_label, foo = "...")]
error: `#[label(foo(...))]` is not a valid attribute
--> fake-test-src-base/session-diagnostic/diagnostic-derive.rs:535:29
|
LL | #[label(no_crate_label, foo("..."))]
error: `#[primary_span]` is not a valid attribute
--> fake-test-src-base/session-diagnostic/diagnostic-derive.rs:547:5
|
LL | #[primary_span]
|
|
= help: the `primary_span` field attribute is not valid for lint diagnostics
error: `#[error(...)]` is not a valid attribute
--> fake-test-src-base/session-diagnostic/diagnostic-derive.rs:567:1
|
LL | #[error(no_crate_example, code = "E0123")]
error: diagnostic slug not specified
--> fake-test-src-base/session-diagnostic/diagnostic-derive.rs:567:1
|
LL | / #[error(no_crate_example, code = "E0123")]
LL | | //~^ ERROR `#[error(...)]` is not a valid attribute
LL | | //~| ERROR diagnostic slug not specified
LL | | //~| ERROR cannot find attribute `error` in this scope
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
--> fake-test-src-base/session-diagnostic/diagnostic-derive.rs:574:1
|
LL | #[warn_(no_crate_example, code = "E0123")]
error: diagnostic slug not specified
--> fake-test-src-base/session-diagnostic/diagnostic-derive.rs:574:1
|
LL | / #[warn_(no_crate_example, code = "E0123")]
LL | | //~^ ERROR `#[warn_(...)]` is not a valid attribute
LL | | //~| ERROR diagnostic slug not specified
LL | | //~| ERROR cannot find attribute `warn_` in this scope
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
--> fake-test-src-base/session-diagnostic/diagnostic-derive.rs:581:1
|
LL | #[lint(no_crate_example, code = "E0123")]
error: diagnostic slug not specified
--> fake-test-src-base/session-diagnostic/diagnostic-derive.rs:581:1
|
LL | / #[lint(no_crate_example, code = "E0123")]
LL | | //~^ ERROR `#[lint(...)]` is not a valid attribute
LL | | //~| ERROR diagnostic slug not specified
LL | | //~| ERROR cannot find attribute `lint` in this scope
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
--> fake-test-src-base/session-diagnostic/diagnostic-derive.rs:588:1
|
LL | #[lint(no_crate_example, code = "E0123")]
error: `#[lint(...)]` is not a valid attribute
--> fake-test-src-base/session-diagnostic/diagnostic-derive.rs:588:1
|
LL | #[lint(no_crate_example, code = "E0123")]
error: diagnostic slug not specified
--> fake-test-src-base/session-diagnostic/diagnostic-derive.rs:588:1
|
LL | / #[lint(no_crate_example, code = "E0123")]
LL | | //~^ ERROR `#[lint(...)]` is not a valid attribute
LL | | //~| ERROR `#[lint(...)]` is not a valid attribute
LL | | //~| ERROR diagnostic slug not specified
LL | | //~| ERROR cannot find attribute `lint` in this scope
LL | | struct LintAttributeOnLintDiag {}
|
|
= help: specify the slug as the first argument to the attribute, such as `#[diag(compiletest_example)]`
error: specified multiple times
--> fake-test-src-base/session-diagnostic/diagnostic-derive.rs:598:53
|
|
LL | #[suggestion(no_crate_suggestion, code = "...", code = ",,,")]
|
note: previously specified here
--> fake-test-src-base/session-diagnostic/diagnostic-derive.rs:598:39
|
|
LL | #[suggestion(no_crate_suggestion, code = "...", code = ",,,")]
error: wrong types for suggestion
--> fake-test-src-base/session-diagnostic/diagnostic-derive.rs:607: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
--> fake-test-src-base/session-diagnostic/diagnostic-derive.rs:615:17
|
|
LL | suggestion: (Span,),
|
|
= help: `#[suggestion(...)]` on a tuple field must be applied to fields of type `(Span, Applicability)`
error: suggestion without `code = "..."`
--> fake-test-src-base/session-diagnostic/diagnostic-derive.rs:622:5
|
LL | #[suggestion(no_crate_suggestion)]
---
error: cannot find attribute `multipart_suggestion` in this scope
--> fake-test-src-base/session-diagnostic/diagnostic-derive.rs:636:7
|
LL | #[multipart_suggestion(no_crate_suggestion)]
error[E0425]: cannot find value `nonsense` in module `crate::fluent_generated`
--> fake-test-src-base/session-diagnostic/diagnostic-derive.rs:70:8
|
|
LL | #[diag(nonsense, code = "E0123")]
| ^^^^^^^^ not found in `crate::fluent_generated`
error[E0425]: cannot find value `compiletest_example` in module `crate::fluent_generated`
--> fake-test-src-base/session-diagnostic/diagnostic-derive.rs:806:8
|
|
LL | #[diag(compiletest_example)]
| ^^^^^^^^^^^^^^^^^^^ not found in `crate::fluent_generated`
error[E0277]: the trait bound `Hello: IntoDiagnosticArg` is not satisfied
--> fake-test-src-base/session-diagnostic/diagnostic-derive.rs:341:10
LL | #[derive(Diagnostic)]
LL | #[derive(Diagnostic)]
| ^^^^^^^^^^ the trait `IntoDiagnosticArg` is not implemented for `Hello`
|
= help: the following other types implement trait `IntoDiagnosticArg`:
&'a T
&'a std::path::Path
&'a str
&rustc_target::spec::TargetTriple
Binder<'_, TraitRef<'_>>
CString
CguReuse
Cow<'a, str>
and 47 others
note: required by a bound in `DiagnosticBuilder::<'a, G>::set_arg`
--> /rustc/FAKE_PREFIX/compiler/rustc_errors/src/diagnostic_builder.rs:747:5
= 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 85 previous errors
Some errors have detailed explanations: E0277, E0425.
For more information about an error, try `rustc --explain E0277`.