rust icon indicating copy to clipboard operation
rust copied to clipboard

Look at proc-macro attributes when encountering unknown attribute

Open estebank opened this issue 1 year ago • 13 comments

error: cannot find attribute `sede` in this scope
  --> $DIR/missing-derive-2.rs:22:7
   |
LL |     #[sede(untagged)]
   |       ^^^^
   |
help: the derive macros `Deserialize` and `Serialize` accept the similarly named `serde` attribute
   |
LL |     #[serde(untagged)]
   |         +

error: cannot find attribute `serde` in this scope
  --> $DIR/missing-derive-2.rs:16:7
   |
LL |     #[serde(untagged)]
   |       ^^^^^
   |
note: `serde` is imported here, but it is a crate, not an attribute
  --> $DIR/missing-derive-2.rs:5:1
   |
LL | extern crate serde;
   | ^^^^^^^^^^^^^^^^^^^
help: `serde` is an attribute that can be used by the derive macros `Serialize` and `Deserialize`, you might be missing a `derive` attribute
   |
LL + #[derive(Serialize, Deserialize)]
LL | enum B {
   |

Partially address #47608. This PR doesn't find macros that haven't yet been imported by name.

estebank avatar Dec 28 '24 03:12 estebank

r? @wesleywiser

rustbot has assigned @wesleywiser. They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

rustbot avatar Dec 28 '24 03:12 rustbot

The job x86_64-gnu-llvm-18 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
#21 exporting to docker image format
#21 sending tarball 29.2s done
#21 DONE 34.7s
##[endgroup]
Setting extra environment values for docker:  --env ENABLE_GCC_CODEGEN=1 --env GCC_EXEC_PREFIX=/usr/lib/gcc/
[CI_JOB_NAME=x86_64-gnu-llvm-18]
debug: `DISABLE_CI_RUSTC_IF_INCOMPATIBLE` configured.
---
sccache: Starting the server...
##[group]Configure the build
configure: processing command line
configure: 
configure: build.configure-args := ['--build=x86_64-unknown-linux-gnu', '--llvm-root=/usr/lib/llvm-18', '--enable-llvm-link-shared', '--set', 'rust.randomize-layout=true', '--set', 'rust.thin-lto-import-instr-limit=10', '--enable-verbose-configure', '--enable-sccache', '--disable-manage-submodules', '--enable-locked-deps', '--enable-cargo-native-static', '--set', 'rust.codegen-units-std=1', '--set', 'dist.compression-profile=balanced', '--dist-compression-formats=xz', '--set', 'rust.lld=false', '--disable-dist-src', '--release-channel=nightly', '--enable-debug-assertions', '--enable-overflow-checks', '--enable-llvm-assertions', '--set', 'rust.verify-llvm-ir', '--set', 'rust.codegen-backends=llvm,cranelift,gcc', '--set', 'llvm.static-libstdcpp', '--enable-new-symbol-mangling']
configure: target.x86_64-unknown-linux-gnu.llvm-config := /usr/lib/llvm-18/bin/llvm-config
configure: llvm.link-shared     := True
configure: rust.randomize-layout := True
configure: rust.thin-lto-import-instr-limit := 10
---

586    |
587 help: `multipart_suggestion` is an attribute that can be used by the derive macro `Subdiagnostic`, you might be missing a `derive` attribute
588    |
- LL | #[derive(Subdiagnostic)]
+ LL + #[derive(Subdiagnostic)]
+ LL | struct MultipartSuggestion {
591 
592 error: cannot find attribute `multipart_suggestion` in this scope

597    |
597    |
598 help: `multipart_suggestion` is an attribute that can be used by the derive macro `Subdiagnostic`, you might be missing a `derive` attribute
599    |
- LL | #[derive(Subdiagnostic)]
+ LL + #[derive(Subdiagnostic)]
+ LL | struct MultipartSuggestion {
602 
603 error: cannot find attribute `multipart_suggestion` in this scope



The actual stderr differed from the expected stderr.
To update references, rerun the tests and pass the `--bless` flag
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: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--check-cfg" "cfg(FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=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" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers"
--- stderr -------------------------------
--- stderr -------------------------------
error: derive(Diagnostic): unsupported type attribute for diagnostic derive enum
   |
LL | #[diag(no_crate_example, code = E0123)]
   | ^


error: derive(Diagnostic): 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: derive(Diagnostic): 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: derive(Diagnostic): `#[nonsense(...)]` is not a valid attribute
   |
   |
LL | #[nonsense(no_crate_example, code = E0123)]


error: derive(Diagnostic): diagnostic slug not specified
   |
   |
LL | #[nonsense(no_crate_example, code = E0123)]
   |
   |
   = help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]`

error: derive(Diagnostic): diagnostic slug not specified
   |
LL | #[diag(code = E0123)]
   | ^
   |
   |
   = help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]`

error: derive(Diagnostic): diagnostic slug must be the first argument
   |
   |
LL | #[diag(nonsense("foo"), code = E0123, slug = "foo")]


error: derive(Diagnostic): diagnostic slug not specified
   |
   |
LL | #[diag(nonsense("foo"), code = E0123, slug = "foo")]
   |
   |
   = help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]`
error: derive(Diagnostic): unknown argument
##[error]  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive.rs:86:8
   |
   |
LL | #[diag(nonsense = "...", code = E0123, slug = "foo")]
   |
   = note: only the `code` parameter is valid after the slug


error: derive(Diagnostic): diagnostic slug not specified
   |
   |
LL | #[diag(nonsense = "...", code = E0123, slug = "foo")]
   |
   |
   = help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]`
error: derive(Diagnostic): unknown argument
##[error]  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive.rs:92:8
   |
   |
LL | #[diag(nonsense = 4, code = E0123, slug = "foo")]
   |
   = note: only the `code` parameter is valid after the slug


error: derive(Diagnostic): diagnostic slug not specified
   |
   |
LL | #[diag(nonsense = 4, code = E0123, slug = "foo")]
   |
   |
   = help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]`
error: derive(Diagnostic): unknown argument
##[error]  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive.rs:98:40
   |
   |
LL | #[diag(no_crate_example, code = E0123, slug = "foo")]
   |
   = note: only the `code` parameter is valid after the slug


error: derive(Diagnostic): `#[suggestion = ...]` is not a valid attribute
   |
   |
LL |     #[suggestion = "bar"]

error: derive(Diagnostic): attribute specified multiple times
##[error]  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive.rs:112:8
   |
---

error: derive(Diagnostic): attribute specified multiple times
##[error]  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive.rs:118:40
   |
LL | #[diag(no_crate_example, code = E0123, code = E0456)]
   |
note: previously specified here
  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive.rs:118:26
   |
   |
LL | #[diag(no_crate_example, code = E0123, code = E0456)]


error: derive(Diagnostic): diagnostic slug must be the first argument
   |
LL | #[diag(no_crate_example, no_crate::example, code = E0123)]
   |                                           ^


error: derive(Diagnostic): 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: derive(Diagnostic): diagnostic slug not specified
   |
LL | #[diag(code = E0123)]
   | ^
   |
   |
   = help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]`

error: derive(Diagnostic): the `#[primary_span]` attribute can only be applied to fields of type `Span` or `MultiSpan`
   |
   |
LL |     #[primary_span]


error: derive(Diagnostic): `#[nonsense]` is not a valid attribute
   |
LL |     #[nonsense]
   |     ^


error: derive(Diagnostic): the `#[label(...)]` attribute can only be applied to fields of type `Span` or `MultiSpan`
   |
   |
LL |     #[label(no_crate_label)]


error: derive(Diagnostic): `name` doesn't refer to a field on this type
   |
   |
LL |     #[suggestion(no_crate_suggestion, code = "{name}")]


error: invalid format string: expected `}` but string was terminated
   |
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)]
   |          ^^^^^^^^^^ 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: derive(Diagnostic): the `#[label(...)]` attribute can only be applied to fields of type `Span` or `MultiSpan`
   |
   |
LL |     #[label(no_crate_label)]


error: derive(Diagnostic): suggestion without `code = "..."`
   |
   |
LL |     #[suggestion(no_crate_suggestion)]


error: derive(Diagnostic): invalid nested attribute
   |
   |
LL |     #[suggestion(nonsense = "bar")]
   |
   |
   = help: only `no_span`, `style`, `code` and `applicability` are valid nested attributes

error: derive(Diagnostic): suggestion without `code = "..."`
   |
   |
LL |     #[suggestion(nonsense = "bar")]


error: derive(Diagnostic): invalid nested attribute
   |
   |
LL |     #[suggestion(msg = "bar")]
   |
   |
   = help: only `no_span`, `style`, `code` and `applicability` are valid nested attributes

error: derive(Diagnostic): suggestion without `code = "..."`
   |
   |
LL |     #[suggestion(msg = "bar")]


error: derive(Diagnostic): wrong field type for suggestion
   |
   |
LL |     #[suggestion(no_crate_suggestion, code = "This is suggested code")]
   |
   |
   = help: `#[suggestion(...)]` should be applied to fields of type `Span` or `(Span, Applicability)`
error: derive(Diagnostic): attribute specified multiple times
##[error]  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive.rs:285:24
   |
LL |     suggestion: (Span, Span, Applicability),
---
   |
LL |     suggestion: (Applicability, Applicability, Span),
   |                  ^^^^^^^^^^^^^

error: derive(Diagnostic): `#[label = ...]` is not a valid attribute
   |
   |
LL |     #[label = "bar"]

error: derive(Diagnostic): attribute specified multiple times
##[error]  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive.rs:451:5
   |
   |
LL |     #[suggestion(no_crate_suggestion, code = "...", applicability = "maybe-incorrect")]
   |
note: previously specified here
  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive.rs:453:24
   |
   |
LL |     suggestion: (Span, Applicability),
   |                        ^^^^^^^^^^^^^

error: derive(Diagnostic): invalid applicability
##[error]  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive.rs:459:69
   |
LL |     #[suggestion(no_crate_suggestion, code = "...", applicability = "batman")]


error: derive(Diagnostic): the `#[help(...)]` attribute can only be applied to fields of type `Span`, `MultiSpan`, `bool` or `()`
   |
   |
LL |     #[help(no_crate_help)]


error: derive(Diagnostic): a diagnostic slug must be the first argument to the attribute
   |
   |
LL |     #[label(no_crate_label, foo)]


error: derive(Diagnostic): only `no_span` is a valid nested attribute
   |
   |
LL |     #[label(no_crate_label, foo = "...")]


error: derive(Diagnostic): only `no_span` is a valid nested attribute
   |
   |
LL |     #[label(no_crate_label, foo("..."))]


error: derive(Diagnostic): `#[primary_span]` is not a valid attribute
   |
   |
LL |     #[primary_span]
   |
   = help: the `primary_span` field attribute is not valid for lint diagnostics


error: derive(Diagnostic): `#[error(...)]` is not a valid attribute
   |
   |
LL | #[error(no_crate_example, code = E0123)]


error: derive(Diagnostic): diagnostic slug not specified
   |
   |
LL | #[error(no_crate_example, code = E0123)]
   |
   |
   = help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]`

error: derive(Diagnostic): `#[warn_(...)]` is not a valid attribute
   |
   |
LL | #[warn_(no_crate_example, code = E0123)]


error: derive(Diagnostic): diagnostic slug not specified
   |
   |
LL | #[warn_(no_crate_example, code = E0123)]
   |
   |
   = help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]`

error: derive(Diagnostic): `#[lint(...)]` is not a valid attribute
   |
LL | #[lint(no_crate_example, code = E0123)]
   | ^


error: derive(Diagnostic): diagnostic slug not specified
   |
LL | #[lint(no_crate_example, code = E0123)]
   | ^
   |
   |
   = help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]`

error: derive(Diagnostic): `#[lint(...)]` is not a valid attribute
   |
LL | #[lint(no_crate_example, code = E0123)]
   | ^


error: derive(Diagnostic): diagnostic slug not specified
   |
LL | #[lint(no_crate_example, code = E0123)]
   | ^
   |
   |
   = help: specify the slug as the first argument to the attribute, such as `#[diag(compiletest_example)]`

error: derive(Diagnostic): attribute specified multiple times
##[error]  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive.rs:613:53
   |
LL |     #[suggestion(no_crate_suggestion, code = "...", code = ",,,")]
   |
note: previously specified here
  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive.rs:613:39
   |
   |
LL |     #[suggestion(no_crate_suggestion, code = "...", code = ",,,")]


error: derive(Diagnostic): wrong types for suggestion
   |
LL |     suggestion: (Span, usize),
   |                        ^^^^^
   |
   |
   = help: `#[suggestion(...)]` on a tuple field must be applied to fields of type `(Span, Applicability)`

error: derive(Diagnostic): wrong types for suggestion
   |
   |
LL |     suggestion: (Span,),
   |
   |
   = help: `#[suggestion(...)]` on a tuple field must be applied to fields of type `(Span, Applicability)`

error: derive(Diagnostic): suggestion without `code = "..."`
   |
   |
LL |     #[suggestion(no_crate_suggestion)]


error: derive(Diagnostic): `#[multipart_suggestion(...)]` is not a valid attribute
   |
LL | #[multipart_suggestion(no_crate_suggestion)]
   | ^
   |
   |
   = help: consider creating a `Subdiagnostic` instead

error: derive(Diagnostic): `#[multipart_suggestion(...)]` is not a valid attribute
   |
LL | #[multipart_suggestion()]
   | ^
   |
   |
   = help: consider creating a `Subdiagnostic` instead

error: derive(Diagnostic): `#[multipart_suggestion(...)]` is not a valid attribute
   |
LL |     #[multipart_suggestion(no_crate_suggestion)]
   |     ^
   |
   |
   = help: consider creating a `Subdiagnostic` instead

error: derive(Diagnostic): `#[suggestion(...)]` is not a valid attribute
   |
LL | #[suggestion(no_crate_suggestion, code = "...")]
   | ^
   |
   |
   = help: `#[label]` and `#[suggestion]` can only be applied to fields

error: derive(Diagnostic): `#[label]` is not a valid attribute
   |
LL | #[label]
   | ^
   |
   |
   = help: `#[label]` and `#[suggestion]` can only be applied to fields

error: derive(Diagnostic): `#[subdiagnostic(...)]` is not a valid attribute
   |
   |
LL |     #[subdiagnostic(bad)]


error: derive(Diagnostic): `#[subdiagnostic = ...]` is not a valid attribute
   |
   |
LL |     #[subdiagnostic = "bad"]


error: derive(Diagnostic): `#[subdiagnostic(...)]` is not a valid attribute
   |
   |
LL |     #[subdiagnostic(bad, bad)]


error: derive(Diagnostic): `#[subdiagnostic(...)]` is not a valid attribute
   |
   |
LL |     #[subdiagnostic("bad")]


error: derive(Diagnostic): `#[subdiagnostic(...)]` is not a valid attribute
   |
   |
LL |     #[subdiagnostic(eager)]


error: derive(Diagnostic): `#[subdiagnostic(...)]` is not a valid attribute
   |
   |
LL |     #[subdiagnostic(eager)]


error: derive(Diagnostic): `#[subdiagnostic(...)]` is not a valid attribute
   |
   |
LL |     #[subdiagnostic(eager)]


error: derive(Diagnostic): expected at least one string literal for `code(...)`
   |
   |
LL |     #[suggestion(code())]


error: derive(Diagnostic): `code(...)` must contain only string literals
   |
   |
LL |     #[suggestion(code(foo))]


error: derive(Diagnostic): `#[suggestion(...)]` is not a valid attribute
   |
   |
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[E0433]: failed to resolve: you might be missing crate `core`
##[error]  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive.rs:58:8
   |
LL | #[diag = "E0123"]
LL | #[diag = "E0123"]
   |        ^ you might be missing crate `core`

error[E0433]: failed to resolve: you might be missing crate `core`
##[error]  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive.rs:802:23
   |
LL |     #[suggestion(code(foo))]
   |                       ^^^ you might be missing crate `core`
error[E0433]: failed to resolve: you might be missing crate `core`
##[error]  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive.rs:811:25
   |
   |
LL |     #[suggestion(code = 3)]
   |                         ^ you might be missing crate `core`
error: cannot find attribute `nonsense` in this scope
##[error]  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive.rs:63:3
   |
   |
LL | #[nonsense(no_crate_example, code = E0123)]

error: cannot find attribute `nonsense` in this scope
##[error]  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive.rs:150:7
   |
   |
LL |     #[nonsense]
   |       ^^^^^^^^

error: cannot find attribute `error` in this scope
##[error]  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive.rs:583:3
   |
LL | #[error(no_crate_example, code = E0123)]

error: cannot find attribute `warn_` in this scope
##[error]  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive.rs:590: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
##[error]  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive.rs:597:3
   |
LL | #[lint(no_crate_example, code = E0123)]
---

error[E0425]: cannot find value `nonsense` in module `crate::fluent_generated`
##[error]  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive.rs:75:8
   |
LL | #[diag(nonsense, code = E0123)]
   |        ^^^^^^^^ not found in `crate::fluent_generated`

error[E0425]: cannot find value `__code_34` in this scope
   |
   |
LL | #[derive(Diagnostic)] //~ ERROR cannot find value `__code_34` 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: IntoDiagArg` is not satisfied
   |
LL | #[derive(Diagnostic)]
   |          ---------- required by a bound introduced by this call
...
...
LL |     other: Hello,
   |            ^^^^^ the trait `IntoDiagArg` is not implemented for `Hello`
   = help: the following other types implement trait `IntoDiagArg`:
             &'a T
             &'a std::path::Path
             &'a str
             &'a str
             &rustc_target::spec::TargetTuple
             AllocId
             AllocRange
             Backtrace
             Binder<I, T>
           and 69 others
note: required by a bound in `Diag::<'a, G>::arg`
   = note: this error originates in the macro `with_fn` (in Nightly builds, run with -Z macro-backtrace for more info)

error: aborting due to 85 previous errors

rust-log-analyzer avatar Dec 28 '24 03:12 rust-log-analyzer

The job x86_64-gnu-llvm-18 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
#21 exporting to docker image format
#21 sending tarball 28.3s done
#21 DONE 33.8s
##[endgroup]
Setting extra environment values for docker:  --env ENABLE_GCC_CODEGEN=1 --env GCC_EXEC_PREFIX=/usr/lib/gcc/
[CI_JOB_NAME=x86_64-gnu-llvm-18]
debug: `DISABLE_CI_RUSTC_IF_INCOMPATIBLE` configured.
---
sccache: Starting the server...
##[group]Configure the build
configure: processing command line
configure: 
configure: build.configure-args := ['--build=x86_64-unknown-linux-gnu', '--llvm-root=/usr/lib/llvm-18', '--enable-llvm-link-shared', '--set', 'rust.randomize-layout=true', '--set', 'rust.thin-lto-import-instr-limit=10', '--enable-verbose-configure', '--enable-sccache', '--disable-manage-submodules', '--enable-locked-deps', '--enable-cargo-native-static', '--set', 'rust.codegen-units-std=1', '--set', 'dist.compression-profile=balanced', '--dist-compression-formats=xz', '--set', 'rust.lld=false', '--disable-dist-src', '--release-channel=nightly', '--enable-debug-assertions', '--enable-overflow-checks', '--enable-llvm-assertions', '--set', 'rust.verify-llvm-ir', '--set', 'rust.codegen-backends=llvm,cranelift,gcc', '--set', 'llvm.static-libstdcpp', '--enable-new-symbol-mangling']
configure: target.x86_64-unknown-linux-gnu.llvm-config := /usr/lib/llvm-18/bin/llvm-config
configure: llvm.link-shared     := True
configure: rust.randomize-layout := True
configure: rust.thin-lto-import-instr-limit := 10
---
diff of stderr:

587 help: `multipart_suggestion` is an attribute that can be used by the derive macro `Subdiagnostic`, you might be missing a `derive` attribute
588    |
589 LL + #[derive(Subdiagnostic)]
-    | struct MultipartSuggestion {
+ LL | struct MultipartSuggestion {
592 
593 error: cannot find attribute `multipart_suggestion` in this scope

599 help: `multipart_suggestion` is an attribute that can be used by the derive macro `Subdiagnostic`, you might be missing a `derive` attribute
599 help: `multipart_suggestion` is an attribute that can be used by the derive macro `Subdiagnostic`, you might be missing a `derive` attribute
600    |
601 LL + #[derive(Subdiagnostic)]
-    | struct MultipartSuggestion {
+ LL | struct MultipartSuggestion {
604 
605 error: cannot find attribute `multipart_suggestion` in this scope



The actual stderr differed from the expected stderr.
To update references, rerun the tests and pass the `--bless` flag
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: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--check-cfg" "cfg(FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=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" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers"
--- stderr -------------------------------
--- stderr -------------------------------
error: derive(Diagnostic): unsupported type attribute for diagnostic derive enum
   |
LL | #[diag(no_crate_example, code = E0123)]
   | ^


error: derive(Diagnostic): 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: derive(Diagnostic): 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: derive(Diagnostic): `#[nonsense(...)]` is not a valid attribute
   |
   |
LL | #[nonsense(no_crate_example, code = E0123)]


error: derive(Diagnostic): diagnostic slug not specified
   |
   |
LL | #[nonsense(no_crate_example, code = E0123)]
   |
   |
   = help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]`

error: derive(Diagnostic): diagnostic slug not specified
   |
LL | #[diag(code = E0123)]
   | ^
   |
   |
   = help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]`

error: derive(Diagnostic): diagnostic slug must be the first argument
   |
   |
LL | #[diag(nonsense("foo"), code = E0123, slug = "foo")]


error: derive(Diagnostic): diagnostic slug not specified
   |
   |
LL | #[diag(nonsense("foo"), code = E0123, slug = "foo")]
   |
   |
   = help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]`
error: derive(Diagnostic): unknown argument
##[error]  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive.rs:86:8
   |
   |
LL | #[diag(nonsense = "...", code = E0123, slug = "foo")]
   |
   = note: only the `code` parameter is valid after the slug


error: derive(Diagnostic): diagnostic slug not specified
   |
   |
LL | #[diag(nonsense = "...", code = E0123, slug = "foo")]
   |
   |
   = help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]`
error: derive(Diagnostic): unknown argument
##[error]  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive.rs:92:8
   |
   |
LL | #[diag(nonsense = 4, code = E0123, slug = "foo")]
   |
   = note: only the `code` parameter is valid after the slug


error: derive(Diagnostic): diagnostic slug not specified
   |
   |
LL | #[diag(nonsense = 4, code = E0123, slug = "foo")]
   |
   |
   = help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]`
error: derive(Diagnostic): unknown argument
##[error]  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive.rs:98:40
   |
   |
LL | #[diag(no_crate_example, code = E0123, slug = "foo")]
   |
   = note: only the `code` parameter is valid after the slug


error: derive(Diagnostic): `#[suggestion = ...]` is not a valid attribute
   |
   |
LL |     #[suggestion = "bar"]

error: derive(Diagnostic): attribute specified multiple times
##[error]  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive.rs:112:8
   |
---

error: derive(Diagnostic): attribute specified multiple times
##[error]  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive.rs:118:40
   |
LL | #[diag(no_crate_example, code = E0123, code = E0456)]
   |
note: previously specified here
  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive.rs:118:26
   |
   |
LL | #[diag(no_crate_example, code = E0123, code = E0456)]


error: derive(Diagnostic): diagnostic slug must be the first argument
   |
LL | #[diag(no_crate_example, no_crate::example, code = E0123)]
   |                                           ^


error: derive(Diagnostic): 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: derive(Diagnostic): diagnostic slug not specified
   |
LL | #[diag(code = E0123)]
   | ^
   |
   |
   = help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]`

error: derive(Diagnostic): the `#[primary_span]` attribute can only be applied to fields of type `Span` or `MultiSpan`
   |
   |
LL |     #[primary_span]


error: derive(Diagnostic): `#[nonsense]` is not a valid attribute
   |
LL |     #[nonsense]
   |     ^


error: derive(Diagnostic): the `#[label(...)]` attribute can only be applied to fields of type `Span` or `MultiSpan`
   |
   |
LL |     #[label(no_crate_label)]


error: derive(Diagnostic): `name` doesn't refer to a field on this type
   |
   |
LL |     #[suggestion(no_crate_suggestion, code = "{name}")]


error: invalid format string: expected `}` but string was terminated
   |
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)]
   |          ^^^^^^^^^^ 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: derive(Diagnostic): the `#[label(...)]` attribute can only be applied to fields of type `Span` or `MultiSpan`
   |
   |
LL |     #[label(no_crate_label)]


error: derive(Diagnostic): suggestion without `code = "..."`
   |
   |
LL |     #[suggestion(no_crate_suggestion)]


error: derive(Diagnostic): invalid nested attribute
   |
   |
LL |     #[suggestion(nonsense = "bar")]
   |
   |
   = help: only `no_span`, `style`, `code` and `applicability` are valid nested attributes

error: derive(Diagnostic): suggestion without `code = "..."`
   |
   |
LL |     #[suggestion(nonsense = "bar")]


error: derive(Diagnostic): invalid nested attribute
   |
   |
LL |     #[suggestion(msg = "bar")]
   |
   |
   = help: only `no_span`, `style`, `code` and `applicability` are valid nested attributes

error: derive(Diagnostic): suggestion without `code = "..."`
   |
   |
LL |     #[suggestion(msg = "bar")]


error: derive(Diagnostic): wrong field type for suggestion
   |
   |
LL |     #[suggestion(no_crate_suggestion, code = "This is suggested code")]
   |
   |
   = help: `#[suggestion(...)]` should be applied to fields of type `Span` or `(Span, Applicability)`
error: derive(Diagnostic): attribute specified multiple times
##[error]  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive.rs:285:24
   |
LL |     suggestion: (Span, Span, Applicability),
---
   |
LL |     suggestion: (Applicability, Applicability, Span),
   |                  ^^^^^^^^^^^^^

error: derive(Diagnostic): `#[label = ...]` is not a valid attribute
   |
   |
LL |     #[label = "bar"]

error: derive(Diagnostic): attribute specified multiple times
##[error]  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive.rs:451:5
   |
   |
LL |     #[suggestion(no_crate_suggestion, code = "...", applicability = "maybe-incorrect")]
   |
note: previously specified here
  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive.rs:453:24
   |
   |
LL |     suggestion: (Span, Applicability),
   |                        ^^^^^^^^^^^^^

error: derive(Diagnostic): invalid applicability
##[error]  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive.rs:459:69
   |
LL |     #[suggestion(no_crate_suggestion, code = "...", applicability = "batman")]


error: derive(Diagnostic): the `#[help(...)]` attribute can only be applied to fields of type `Span`, `MultiSpan`, `bool` or `()`
   |
   |
LL |     #[help(no_crate_help)]


error: derive(Diagnostic): a diagnostic slug must be the first argument to the attribute
   |
   |
LL |     #[label(no_crate_label, foo)]


error: derive(Diagnostic): only `no_span` is a valid nested attribute
   |
   |
LL |     #[label(no_crate_label, foo = "...")]


error: derive(Diagnostic): only `no_span` is a valid nested attribute
   |
   |
LL |     #[label(no_crate_label, foo("..."))]


error: derive(Diagnostic): `#[primary_span]` is not a valid attribute
   |
   |
LL |     #[primary_span]
   |
   = help: the `primary_span` field attribute is not valid for lint diagnostics


error: derive(Diagnostic): `#[error(...)]` is not a valid attribute
   |
   |
LL | #[error(no_crate_example, code = E0123)]


error: derive(Diagnostic): diagnostic slug not specified
   |
   |
LL | #[error(no_crate_example, code = E0123)]
   |
   |
   = help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]`

error: derive(Diagnostic): `#[warn_(...)]` is not a valid attribute
   |
   |
LL | #[warn_(no_crate_example, code = E0123)]


error: derive(Diagnostic): diagnostic slug not specified
   |
   |
LL | #[warn_(no_crate_example, code = E0123)]
   |
   |
   = help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]`

error: derive(Diagnostic): `#[lint(...)]` is not a valid attribute
   |
LL | #[lint(no_crate_example, code = E0123)]
   | ^


error: derive(Diagnostic): diagnostic slug not specified
   |
LL | #[lint(no_crate_example, code = E0123)]
   | ^
   |
   |
   = help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]`

error: derive(Diagnostic): `#[lint(...)]` is not a valid attribute
   |
LL | #[lint(no_crate_example, code = E0123)]
   | ^


error: derive(Diagnostic): diagnostic slug not specified
   |
LL | #[lint(no_crate_example, code = E0123)]
   | ^
   |
   |
   = help: specify the slug as the first argument to the attribute, such as `#[diag(compiletest_example)]`

error: derive(Diagnostic): attribute specified multiple times
##[error]  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive.rs:613:53
   |
LL |     #[suggestion(no_crate_suggestion, code = "...", code = ",,,")]
   |
note: previously specified here
  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive.rs:613:39
   |
   |
LL |     #[suggestion(no_crate_suggestion, code = "...", code = ",,,")]


error: derive(Diagnostic): wrong types for suggestion
   |
LL |     suggestion: (Span, usize),
   |                        ^^^^^
   |
   |
   = help: `#[suggestion(...)]` on a tuple field must be applied to fields of type `(Span, Applicability)`

error: derive(Diagnostic): wrong types for suggestion
   |
   |
LL |     suggestion: (Span,),
   |
   |
   = help: `#[suggestion(...)]` on a tuple field must be applied to fields of type `(Span, Applicability)`

error: derive(Diagnostic): suggestion without `code = "..."`
   |
   |
LL |     #[suggestion(no_crate_suggestion)]


error: derive(Diagnostic): `#[multipart_suggestion(...)]` is not a valid attribute
   |
LL | #[multipart_suggestion(no_crate_suggestion)]
   | ^
   |
   |
   = help: consider creating a `Subdiagnostic` instead

error: derive(Diagnostic): `#[multipart_suggestion(...)]` is not a valid attribute
   |
LL | #[multipart_suggestion()]
   | ^
   |
   |
   = help: consider creating a `Subdiagnostic` instead

error: derive(Diagnostic): `#[multipart_suggestion(...)]` is not a valid attribute
   |
LL |     #[multipart_suggestion(no_crate_suggestion)]
   |     ^
   |
   |
   = help: consider creating a `Subdiagnostic` instead

error: derive(Diagnostic): `#[suggestion(...)]` is not a valid attribute
   |
LL | #[suggestion(no_crate_suggestion, code = "...")]
   | ^
   |
   |
   = help: `#[label]` and `#[suggestion]` can only be applied to fields

error: derive(Diagnostic): `#[label]` is not a valid attribute
   |
LL | #[label]
   | ^
   |
   |
   = help: `#[label]` and `#[suggestion]` can only be applied to fields

error: derive(Diagnostic): `#[subdiagnostic(...)]` is not a valid attribute
   |
   |
LL |     #[subdiagnostic(bad)]


error: derive(Diagnostic): `#[subdiagnostic = ...]` is not a valid attribute
   |
   |
LL |     #[subdiagnostic = "bad"]


error: derive(Diagnostic): `#[subdiagnostic(...)]` is not a valid attribute
   |
   |
LL |     #[subdiagnostic(bad, bad)]


error: derive(Diagnostic): `#[subdiagnostic(...)]` is not a valid attribute
   |
   |
LL |     #[subdiagnostic("bad")]


error: derive(Diagnostic): `#[subdiagnostic(...)]` is not a valid attribute
   |
   |
LL |     #[subdiagnostic(eager)]


error: derive(Diagnostic): `#[subdiagnostic(...)]` is not a valid attribute
   |
   |
LL |     #[subdiagnostic(eager)]


error: derive(Diagnostic): `#[subdiagnostic(...)]` is not a valid attribute
   |
   |
LL |     #[subdiagnostic(eager)]


error: derive(Diagnostic): expected at least one string literal for `code(...)`
   |
   |
LL |     #[suggestion(code())]


error: derive(Diagnostic): `code(...)` must contain only string literals
   |
   |
LL |     #[suggestion(code(foo))]


error: derive(Diagnostic): `#[suggestion(...)]` is not a valid attribute
   |
   |
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[E0433]: failed to resolve: you might be missing crate `core`
##[error]  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive.rs:58:8
   |
LL | #[diag = "E0123"]
LL | #[diag = "E0123"]
   |        ^ you might be missing crate `core`

error[E0433]: failed to resolve: you might be missing crate `core`
##[error]  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive.rs:802:23
   |
LL |     #[suggestion(code(foo))]
   |                       ^^^ you might be missing crate `core`
error[E0433]: failed to resolve: you might be missing crate `core`
##[error]  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive.rs:811:25
   |
   |
LL |     #[suggestion(code = 3)]
   |                         ^ you might be missing crate `core`
error: cannot find attribute `nonsense` in this scope
##[error]  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive.rs:63:3
   |
   |
LL | #[nonsense(no_crate_example, code = E0123)]

error: cannot find attribute `nonsense` in this scope
##[error]  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive.rs:150:7
   |
   |
LL |     #[nonsense]
   |       ^^^^^^^^

error: cannot find attribute `error` in this scope
##[error]  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive.rs:583:3
   |
LL | #[error(no_crate_example, code = E0123)]

error: cannot find attribute `warn_` in this scope
##[error]  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive.rs:590: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
##[error]  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive.rs:597:3
   |
LL | #[lint(no_crate_example, code = E0123)]
---

error[E0425]: cannot find value `nonsense` in module `crate::fluent_generated`
##[error]  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive.rs:75:8
   |
LL | #[diag(nonsense, code = E0123)]
   |        ^^^^^^^^ not found in `crate::fluent_generated`

error[E0425]: cannot find value `__code_34` in this scope
   |
   |
LL | #[derive(Diagnostic)] //~ ERROR cannot find value `__code_34` 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: IntoDiagArg` is not satisfied
   |
LL | #[derive(Diagnostic)]
   |          ---------- required by a bound introduced by this call
...
...
LL |     other: Hello,
   |            ^^^^^ the trait `IntoDiagArg` is not implemented for `Hello`
   = help: the following other types implement trait `IntoDiagArg`:
             &'a T
             &'a std::path::Path
             &'a str
             &'a str
             &rustc_target::spec::TargetTuple
             AllocId
             AllocRange
             Backtrace
             Binder<I, T>
           and 69 others
note: required by a bound in `Diag::<'a, G>::arg`
   = note: this error originates in the macro `with_fn` (in Nightly builds, run with -Z macro-backtrace for more info)

error: aborting due to 85 previous errors

rust-log-analyzer avatar Dec 28 '24 05:12 rust-log-analyzer

:umbrella: The latest upstream changes (presumably #135896) made this pull request unmergeable. Please resolve the merge conflicts.

bors avatar Jan 23 '25 01:01 bors

The job x86_64-gnu-llvm-18 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
#21 exporting to docker image format
#21 sending tarball 29.6s done
#21 DONE 42.2s
##[endgroup]
Setting extra environment values for docker:  --env ENABLE_GCC_CODEGEN=1 --env GCC_EXEC_PREFIX=/usr/lib/gcc/
[CI_JOB_NAME=x86_64-gnu-llvm-18]
debug: `DISABLE_CI_RUSTC_IF_INCOMPATIBLE` configured.
---
sccache: Starting the server...
##[group]Configure the build
configure: processing command line
configure: 
configure: build.configure-args := ['--build=x86_64-unknown-linux-gnu', '--llvm-root=/usr/lib/llvm-18', '--enable-llvm-link-shared', '--set', 'rust.randomize-layout=true', '--set', 'rust.thin-lto-import-instr-limit=10', '--enable-verbose-configure', '--enable-sccache', '--disable-manage-submodules', '--enable-locked-deps', '--enable-cargo-native-static', '--set', 'rust.codegen-units-std=1', '--set', 'dist.compression-profile=balanced', '--dist-compression-formats=xz', '--set', 'rust.lld=false', '--disable-dist-src', '--release-channel=nightly', '--enable-debug-assertions', '--enable-overflow-checks', '--enable-llvm-assertions', '--set', 'rust.verify-llvm-ir', '--set', 'rust.codegen-backends=llvm,cranelift,gcc', '--set', 'llvm.static-libstdcpp', '--enable-new-symbol-mangling']
configure: target.x86_64-unknown-linux-gnu.llvm-config := /usr/lib/llvm-18/bin/llvm-config
configure: llvm.link-shared     := True
configure: rust.randomize-layout := True
configure: rust.thin-lto-import-instr-limit := 10
---
   Compiling rustc_trait_selection v0.0.0 (/checkout/compiler/rustc_trait_selection)
error[E0433]: failed to resolve: use of undeclared type `Annotatable`
   --> compiler/rustc_resolve/src/macros.rs:292:42
    |
292 |             InvocationKind::Attr { item: Annotatable::Item(item), .. }
    |                                          ^^^^^^^^^^^ use of undeclared type `Annotatable`
help: consider importing this enum
    |
4   + use rustc_expand::base::Annotatable;
    |
    |

error[E0061]: this method takes 7 arguments but 6 arguments were supplied
    --> compiler/rustc_resolve/src/diagnostics.rs:1041:59
     |
1041 |   ...                   let Ok((Some(ext), _)) = this.resolve_macro_path(
     |  _____________________________________________________^^^^^^^^^^^^^^^^^^-
1042 | | ...                       derive,
1044 | | ...                       parent_scope,
...    |
1047 | | ...                       None,
1048 | | ...                   ) else {
1048 | | ...                   ) else {
     | |_______________________- argument #7 of type `std::option::Option<rustc_span::Span>` is missing
note: method defined here
    --> compiler/rustc_resolve/src/macros.rs:689:19
     |
689  |     pub(crate) fn resolve_macro_path(
689  |     pub(crate) fn resolve_macro_path(
     |                   ^^^^^^^^^^^^^^^^^^
690  |         &mut self,
691  |         path: &ast::Path,
     |         ----------------
692  |         kind: Option<MacroKind>,
     |         -----------------------
693  |         parent_scope: &ParentScope<'ra>,
694  |         trace: bool,
     |         -----------
695  |         force: bool,
     |         -----------
     |         -----------
696  |         ignore_import: Option<Import<'ra>>,
697  |         suggestion_span: Option<Span>,
     |         -----------------------------
help: provide the argument
     |
     |
1041 |                             let Ok((Some(ext), _)) = this.resolve_macro_path(derive, Some(MacroKind::Derive), parent_scope, false, false, None, /* std::option::Option<rustc_span::Span> */) else {

Some errors have detailed explanations: E0061, E0433.
For more information about an error, try `rustc --explain E0061`.
error: could not compile `rustc_resolve` (lib) due to 2 previous errors

rust-log-analyzer avatar Jan 24 '25 18:01 rust-log-analyzer

:umbrella: The latest upstream changes (presumably #136471) made this pull request unmergeable. Please resolve the merge conflicts.

bors avatar Feb 06 '25 14:02 bors

:umbrella: The latest upstream changes (presumably #138532) made this pull request unmergeable. Please resolve the merge conflicts.

bors avatar Mar 15 '25 15:03 bors

@bors r+ rollup

wesleywiser avatar Jun 09 '25 15:06 wesleywiser

:pushpin: Commit b2f9a3f4b6b4a15780d9babd0ef35770db1cab43 has been approved by wesleywiser

It is now in the queue for this repository.

bors avatar Jun 09 '25 15:06 bors

@bors r=wesleywiser

estebank avatar Jun 09 '25 19:06 estebank

:pushpin: Commit 3ed1787714c93172e4fc52fbece23245cc9dd5cb has been approved by wesleywiser

It is now in the queue for this repository.

bors avatar Jun 09 '25 19:06 bors

Failed in rollup: https://github.com/rust-lang/rust/pull/142290#issuecomment-2959558493 @bors r-

fmease avatar Jun 10 '25 14:06 fmease

I've only briefly looked at the failure but I see a list of something changing order depending on the target (failure here is on dist-i586-gnu-i586-i686-musl), so this is likely query instability, e.g., iterating over a HashMap.

fmease avatar Jun 10 '25 14:06 fmease

The job x86_64-gnu-llvm-19 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
#19 exporting to docker image format
#19 sending tarball 28.3s done
#19 DONE 32.7s
##[endgroup]
Setting extra environment values for docker:  --env ENABLE_GCC_CODEGEN=1 --env GCC_EXEC_PREFIX=/usr/lib/gcc/
[CI_JOB_NAME=x86_64-gnu-llvm-19]
[CI_JOB_NAME=x86_64-gnu-llvm-19]
debug: `DISABLE_CI_RUSTC_IF_INCOMPATIBLE` configured.
---
sccache: Listening on address 127.0.0.1:4226
##[group]Configure the build
configure: processing command line
configure: 
configure: build.configure-args := ['--build=x86_64-unknown-linux-gnu', '--llvm-root=/usr/lib/llvm-19', '--enable-llvm-link-shared', '--set', 'rust.randomize-layout=true', '--set', 'rust.thin-lto-import-instr-limit=10', '--set', 'build.print-step-timings', '--enable-verbose-tests', '--set', 'build.metrics', '--enable-verbose-configure', '--enable-sccache', '--disable-manage-submodules', '--enable-locked-deps', '--enable-cargo-native-static', '--set', 'rust.codegen-units-std=1', '--set', 'dist.compression-profile=balanced', '--dist-compression-formats=xz', '--set', 'rust.lld=false', '--disable-dist-src', '--release-channel=nightly', '--enable-debug-assertions', '--enable-overflow-checks', '--enable-llvm-assertions', '--set', 'rust.verify-llvm-ir', '--set', 'rust.codegen-backends=llvm,cranelift,gcc', '--set', 'llvm.static-libstdcpp', '--set', 'gcc.download-ci-gcc=true', '--enable-new-symbol-mangling']
configure: build.build          := x86_64-unknown-linux-gnu
configure: target.x86_64-unknown-linux-gnu.llvm-config := /usr/lib/llvm-19/bin/llvm-config
configure: llvm.link-shared     := True
configure: rust.randomize-layout := True
configure: rust.thin-lto-import-instr-limit := 10
---
   Compiling rustc-main v0.0.0 (/checkout/compiler/rustc)
error[E0308]: mismatched types
    --> compiler/rustc_resolve/src/diagnostics.rs:1671:55
     |
1671 |         let mut all_attrs: UnordMap<Symbol, Vec<_>> = FxHashMap::default();
     |                            ------------------------   ^^^^^^^^^^^^^^^^^^^^ expected `UnordMap<Symbol, Vec<_>>`, found `HashMap<_, _, FxBuildHasher>`
     |                            |
     |                            expected due to this
     |
     = note: expected struct `UnordMap<rustc_span::Symbol, Vec<_>>`
                found struct `HashMap<_, _, rustc_hash::FxBuildHasher>`

error[E0277]: the trait bound `Vec<Symbol>: From<UnordItems<Symbol, impl Iterator<Item = Symbol>>>` is not satisfied
    --> compiler/rustc_resolve/src/diagnostics.rs:1737:77
     |
1737 |             let mut all_attr_names: Vec<Symbol> = all_attrs.keys().cloned().collect();
     |                                                                             ^^^^^^^ unsatisfied trait bound
     |
     = help: the trait `From<UnordItems<rustc_span::Symbol, impl std::iter::Iterator<Item = rustc_span::Symbol>>>` is not implemented for `Vec<rustc_span::Symbol>`
     = help: the following other types implement trait `From<T>`:
               `Vec<T, A>` implements `From<BinaryHeap<T, A>>`
               `Vec<T, A>` implements `From<VecDeque<T, A>>`
               `Vec<T, A>` implements `From<std::boxed::Box<[T], A>>`
               `Vec<T>` implements `From<&[T; N]>`
               `Vec<T>` implements `From<&[T]>`
               `Vec<T>` implements `From<&mut [T; N]>`
               `Vec<T>` implements `From<&mut [T]>`
               `Vec<T>` implements `From<Cow<'_, [T]>>`
             and 6 others
note: required by a bound in `UnordItems::<T, I>::collect`
    --> /checkout/compiler/rustc_data_structures/src/unord.rs:109:23
     |
109  |     pub fn collect<C: From<UnordItems<T, I>>>(self) -> C {
     |                       ^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `UnordItems::<T, I>::collect`
     = note: the full name for the type has been written to '/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/rustc_resolve-ed0f5900a1f3f992.long-type-13901347189982689668.txt'
     = note: consider using `--verbose` to print the full type name to the console

Some errors have detailed explanations: E0277, E0308.
For more information about an error, try `rustc --explain E0277`.
[RUSTC-TIMING] rustc_resolve test:false 3.270

rust-log-analyzer avatar Jun 10 '25 19:06 rust-log-analyzer

@bors r=wesleywiser

estebank avatar Jun 10 '25 23:06 estebank

:pushpin: Commit 1cc4d35ea18fad2698368bf234865ea53831ba80 has been approved by wesleywiser

It is now in the queue for this repository.

bors avatar Jun 10 '25 23:06 bors

seems it still has problems?

@bors r-

workingjubilee avatar Jun 11 '25 08:06 workingjubilee

https://github.com/rust-lang/rust/pull/142333#issuecomment-2961586262

workingjubilee avatar Jun 11 '25 08:06 workingjubilee

@bors rollup=iffy

workingjubilee avatar Jun 11 '25 08:06 workingjubilee

seems it still has problems?

I think there's another Vec<Symbol>::sort() that needs to be Vec<Symbol>::sort_by_key(|s| s.as_str()) in a different message :(

estebank avatar Jun 11 '25 16:06 estebank

@bors r=wesleywiser

estebank avatar Jun 11 '25 19:06 estebank

:pushpin: Commit 69a312250a4702ec337789611a6d6fcf6dbc1b5c has been approved by wesleywiser

It is now in the queue for this repository.

bors avatar Jun 11 '25 19:06 bors

:hourglass: Testing commit 69a312250a4702ec337789611a6d6fcf6dbc1b5c with merge b84566d02be02d27dc3bfe639fbbc82951a31f98...

bors avatar Jun 11 '25 20:06 bors

The job dist-i586-gnu-i586-i686-musl failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
---- [ui] tests/ui/macros/missing-derive-1.rs stdout ----
Saved the actual stderr to `/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/macros/missing-derive-1/missing-derive-1.stderr`
diff of stderr:

38 LL |     #[sede(untagged)]
39    |       ^^^^
40    |
- help: the derive macros `Deserialize` and `Serialize` accept the similarly named `serde` attribute
+ help: the derive macros `Serialize` and `Deserialize` accept the similarly named `serde` attribute
42    |
---
To only update this specific test, also pass `--test-args macros/missing-derive-1.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/macros/missing-derive-1.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=i686-unknown-linux-musl" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/macros/missing-derive-1" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/i686-unknown-linux-musl/native/rust-test-helpers" "-Clinker=/musl-i686/bin/musl-gcc" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/macros/missing-derive-1/auxiliary"
stdout: none
--- stderr -------------------------------
error: cannot find attribute `serde` in this scope
##[error]  --> /checkout/tests/ui/macros/missing-derive-1.rs:8:3
   |
LL | #[serde(untagged)] //~ ERROR cannot find attribute `serde`
   |   ^^^^^
   |
note: `serde` is imported here, but it is a crate, not an attribute
  --> /checkout/tests/ui/macros/missing-derive-1.rs:5:1
   |
LL | extern crate serde;
   | ^^^^^^^^^^^^^^^^^^^
help: `serde` is an attribute that can be used by the derive macros `Deserialize` and `Serialize`, you might be missing a `derive` attribute
   |
LL + #[derive(Deserialize, Serialize)]
LL | enum A { //~ HELP `serde` is an attribute that can be used by the derive macros `Deserialize` and `Serialize`
   |

error: cannot find attribute `serde` in this scope
##[error]  --> /checkout/tests/ui/macros/missing-derive-1.rs:16:7
   |
LL |     #[serde(untagged)] //~ ERROR cannot find attribute `serde`
   |       ^^^^^
   |
note: `serde` is imported here, but it is a crate, not an attribute
  --> /checkout/tests/ui/macros/missing-derive-1.rs:5:1
   |
LL | extern crate serde;
   | ^^^^^^^^^^^^^^^^^^^
help: `serde` is an attribute that can be used by the derive macros `Deserialize` and `Serialize`, you might be missing a `derive` attribute
   |
LL + #[derive(Deserialize, Serialize)]
LL | enum B { //~ HELP `serde` is an attribute that can be used by the derive macros `Deserialize` and `Serialize`
   |

error: cannot find attribute `sede` in this scope
##[error]  --> /checkout/tests/ui/macros/missing-derive-1.rs:22:7
   |
LL |     #[sede(untagged)] //~ ERROR cannot find attribute `sede`
   |       ^^^^
   |
help: the derive macros `Serialize` and `Deserialize` accept the similarly named `serde` attribute
   |
LL |     #[serde(untagged)] //~ ERROR cannot find attribute `sede`
   |         +

error: aborting due to 3 previous errors
------------------------------------------


---- [ui] tests/ui/macros/missing-derive-2.rs stdout ----
Saved the actual stderr to `/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/macros/missing-derive-2/missing-derive-2.stderr`
diff of stderr:

4 LL |     #[sede(untagged)]
5    |       ^^^^
6    |
- help: the derive macros `Deserialize` and `Serialize` accept the similarly named `serde` attribute
+ help: the derive macros `Serialize` and `Deserialize` accept the similarly named `serde` attribute
8    |
---
To only update this specific test, also pass `--test-args macros/missing-derive-2.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/macros/missing-derive-2.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=i686-unknown-linux-musl" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/macros/missing-derive-2" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/i686-unknown-linux-musl/native/rust-test-helpers" "-Clinker=/musl-i686/bin/musl-gcc" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/macros/missing-derive-2/auxiliary"
stdout: none
--- stderr -------------------------------
error: cannot find attribute `sede` in this scope
##[error]  --> /checkout/tests/ui/macros/missing-derive-2.rs:22:7
   |
LL |     #[sede(untagged)] //~ ERROR cannot find attribute `sede`
   |       ^^^^
   |
help: the derive macros `Serialize` and `Deserialize` accept the similarly named `serde` attribute
   |
LL |     #[serde(untagged)] //~ ERROR cannot find attribute `sede`
   |         +

error: cannot find attribute `serde` in this scope
##[error]  --> /checkout/tests/ui/macros/missing-derive-2.rs:16:7
   |
LL |     #[serde(untagged)] //~ ERROR cannot find attribute `serde`
   |       ^^^^^
   |
note: `serde` is imported here, but it is a crate, not an attribute
  --> /checkout/tests/ui/macros/missing-derive-2.rs:5:1
   |
LL | extern crate serde;
   | ^^^^^^^^^^^^^^^^^^^
help: `serde` is an attribute that can be used by the derive macros `Deserialize` and `Serialize`, you might be missing a `derive` attribute
   |
LL + #[derive(Deserialize, Serialize)]
LL | enum B { //~ HELP `serde` is an attribute that can be used by the derive macros `Deserialize` and `Serialize`
   |

error: cannot find attribute `serde` in this scope
##[error]  --> /checkout/tests/ui/macros/missing-derive-2.rs:8:3
   |
LL | #[serde(untagged)] //~ ERROR cannot find attribute `serde`
   |   ^^^^^
   |
note: `serde` is imported here, but it is a crate, not an attribute
  --> /checkout/tests/ui/macros/missing-derive-2.rs:5:1
   |
LL | extern crate serde;
   | ^^^^^^^^^^^^^^^^^^^
help: `serde` is an attribute that can be used by the derive macros `Deserialize` and `Serialize`, you might be missing a `derive` attribute
   |
LL + #[derive(Deserialize, Serialize)]
LL | enum A { //~ HELP `serde` is an attribute that can be used by the derive macros `Deserialize` and `Serialize`
   |

error: aborting due to 3 previous errors
------------------------------------------

rust-log-analyzer avatar Jun 11 '25 21:06 rust-log-analyzer

:broken_heart: Test failed - checks-actions

bors avatar Jun 11 '25 22:06 bors

@bors r=wesleywiser

estebank avatar Jun 12 '25 22:06 estebank

:pushpin: Commit 92a798dac0e2e13380d053b532ef36f1eddf9acf has been approved by wesleywiser

It is now in the queue for this repository.

bors avatar Jun 12 '25 22:06 bors

:hourglass: Testing commit 92a798dac0e2e13380d053b532ef36f1eddf9acf with merge d087f112b7d1323446c7b39a8b616aee7fa56b3d...

bors avatar Jun 13 '25 22:06 bors

:sunny: Test successful - checks-actions Approved by: wesleywiser Pushing d087f112b7d1323446c7b39a8b616aee7fa56b3d to master...

bors avatar Jun 14 '25 01:06 bors

What is this? This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.

Comparing 8da623945f83933dd38644d5745532ee032e855b (parent) -> d087f112b7d1323446c7b39a8b616aee7fa56b3d (this PR)

Test differences

Show 14 test diffs

Stage 1

  • [ui] tests/ui/macros/missing-derive-1.rs: [missing] -> pass (J1)
  • [ui] tests/ui/macros/missing-derive-2.rs: [missing] -> pass (J1)
  • [ui] tests/ui/macros/missing-derive-3.rs: [missing] -> pass (J1)

Stage 2

  • [ui] tests/ui/macros/missing-derive-1.rs: [missing] -> pass (J0)
  • [ui] tests/ui/macros/missing-derive-2.rs: [missing] -> pass (J0)
  • [ui] tests/ui/macros/missing-derive-3.rs: [missing] -> pass (J0)

Additionally, 8 doctest diffs were found. These are ignored, as they are noisy.

Job group index

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard d087f112b7d1323446c7b39a8b616aee7fa56b3d --output-dir test-dashboard

And then open test-dashboard/index.html in your browser to see an overview of all executed tests.

Job duration changes

  1. x86_64-apple-2: 5617.4s -> 3428.9s (-39.0%)
  2. x86_64-apple-1: 8936.4s -> 6185.4s (-30.8%)
  3. dist-aarch64-apple: 4604.1s -> 5629.0s (22.3%)
  4. dist-apple-various: 7919.5s -> 6243.7s (-21.2%)
  5. aarch64-apple: 5190.8s -> 4330.2s (-16.6%)
  6. dist-x86_64-apple: 9236.5s -> 7706.6s (-16.6%)
  7. mingw-check-2: 2231.2s -> 1885.4s (-15.5%)
  8. i686-gnu-1: 8471.4s -> 7221.1s (-14.8%)
  9. mingw-check-1: 1961.5s -> 1677.9s (-14.5%)
  10. i686-gnu-2: 6253.9s -> 5391.9s (-13.8%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance that executed the job, system noise, invalidated caches, etc. The table above is provided mostly for t-infra members, for simpler debugging of potential CI slow-downs.

github-actions[bot] avatar Jun 14 '25 02:06 github-actions[bot]