← Back to Pull requests

Change derive macro for Eq to not impl Eq trait fn #153125

Open
KiChjang opened this pull request with 614 lines diff across 8 files
View on GitHub
KiChjang KiChjang commented on Feb 26, 2026 09:09 UTC
Author

<!-- homu-ignore:start -->
View all comments
<!-- homu-ignore:end -->

<!-- homu-ignore:start -->
<!--
If this PR is related to an unstable feature or an otherwise tracked effort,
please link to the relevant tracking issue here. If you don't know of a related
tracking issue or there are none, feel free to ignore this.

This PR will get automatically assigned to a reviewer. In case you would like
a specific user to review your work, you can assign it to them by using

r? <reviewer name>
-->
<!-- homu-ignore:end -->

Fixes rust-lang/rust#152504.

r? @cyrgani

Diff: 614 lines (+509 / -105) across 8 files Reviewer: nnethercote Review duration: 406598m
All Vouch review confidence checks passed
Residual risk 0.07 = Change Risk (0.59) × (1 − Review Confidence (0.89)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.59 · 614 lines diff across 8 files
0.59
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.89 · 5 substantive comment(s)
0.89
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 50%
88%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size diff_size
0.384
Real PR Conversation Timeline
49 items
rustbot rustbot commented on Feb 26, 2026 09:09 UTC
Contributor

Changes to the code generated for builtin derived traits.

cc @nnethercote

rust-log-analyzer rust-log-analyzer commented on Feb 26, 2026 09:19 UTC
Contributor

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

<details><summary><i>Click to see the possible cause of the failure (guessed by this bot)</i></summary>

/dev/sda15      105M  6.2M   99M   6% /boot/efi
tmpfs           1.6G   12K  1.6G   1% /run/user/1001
================================================================================

Sufficient disk space available (95820308KB >= 52428800KB). Skipping cleanup.
##[group]Run echo "[CI_PR_NUMBER=$num]"
echo "[CI_PR_NUMBER=$num]"
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
---
   --> /cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rand_core-0.9.3/src/lib.rs:322:50
    |
321 | #[derive(Debug, Eq, PartialEq, Hash)]
    |                 -- in this derive macro expansion
322 | pub struct UnwrapMut<'r, R: TryRngCore + ?Sized>(pub &'r mut R);
    |                      --                          ^^^^^^^^^^^^^ ...so that the type `R` will meet its required lifetime bounds
    |                      |
    |                      the parameter type `R` must be valid for the lifetime `'r` as defined here...
    |
   --> library/core/src/cmp.rs:364:0
    |
    = note: in this expansion of `#[derive(Eq)]`
help: consider adding an explicit lifetime bound
    |
322 | pub struct UnwrapMut<'r, R: TryRngCore + ?Sized + 'r>(pub &'r mut R);
    |                                                 ++++

For more information about this error, try `rustc --explain E0309`.
[RUSTC-TIMING] rand_core test:false 0.228
error: could not compile `rand_core` (lib) due to 1 previous error

</details>

For more information how to resolve CI failures of this job, visit this link.

nnethercote nnethercote commented on code on Feb 26, 2026 09:25 UTC
Code Review
tests/ui/deriving/deriving-all-codegen.stdout:1
@@ -1046,11 +1149,13 @@ impl ::core::cmp::PartialEq for Enum0 {
     fn eq(&self, other: &Enum0) -> bool { match *self {} }
 }
 #[automatically_derived]
-impl ::core::cmp::Eq for Enum0 {
-    #[doc(hidden)]
-    #[coverage(off)]
-    fn assert_fields_are_eq(&self) {}
-}
+impl ::core::cmp::Eq for Enum0 { }
+const _: () =
+    {
+        #[doc(hidden)]
+        #[coverage(off)]
+        const fn assert_fields_are_eq() {}

It would be a nice follow-up to not emit these when assert_fields_are_eq is empty.

theemathas theemathas commented on Feb 26, 2026 09:29 UTC
Contributor

A test case that seems like might break with this:

trait Trait<T> {}

#[derive(PartialEq, Eq)]
struct Thing<T: Trait<Self>>(T);

theemathas theemathas commented on Feb 26, 2026 09:36 UTC
Contributor

A less exotic test case:

#[derive(PartialEq, Eq)]
struct Thing(Option<Box<Self>>);

Kivooeo Kivooeo commented on Feb 26, 2026 09:38 UTC
Contributor

Nick, I would reassign to you (feel free to reroll) since @cyrgani is a triage member and can't approve compiler changes

r? nnethercote

KiChjang KiChjang commented on Feb 26, 2026 10:21 UTC
Author

A less exotic test case:

>
> #[derive(PartialEq, Eq)]
> struct Thing(Option<Box<Self>>);
> 

Gah, because we're now generating a const item instead of a trait impl block, we'd need to rewrite the Self reference to its concrete type, but this is a bit tough as it would require us to supply the correct generic params to the Self concrete type if it has any.

A better solution now would be to emit the following:

impl<...> Type<...> {
    const fn assert_fields_are_eq() {
        let _: ::core::cmp::AssertParamIsEq<Option<Box<Self>>>;
    }
}

This would side-step the issue of rewriting Self into its concrete type.

rust-log-analyzer rust-log-analyzer commented on Feb 26, 2026 11:37 UTC
Contributor

The job aarch64-gnu-llvm-20-1 failed! Check out the build log: (web) (plain enhanced) (plain)

<details><summary><i>Click to see the possible cause of the failure (guessed by this bot)</i></summary>

/dev/sda15       98M  6.4M   92M   7% /boot/efi
tmpfs           1.6G   16K  1.6G   1% /run/user/1001
================================================================================

Sufficient disk space available (120901064KB >= 52428800KB). Skipping cleanup.
##[group]Run echo "[CI_PR_NUMBER=$num]"
echo "[CI_PR_NUMBER=$num]"
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
---
set -ex

# Run a subset of tests. Used to run tests in parallel in multiple jobs.

# When this job partition is run as part of PR CI, skip tidy to allow revealing more failures. The
# dedicated `tidy` job failing won't block other PR CI jobs from completing, and so tidy failures
# shouldn't inhibit revealing other failures in PR CI jobs.
if [ "$PR_CI_JOB" == "1" ]; then
  echo "PR_CI_JOB set; skipping tidy"
  SKIP_TIDY="--skip tidy"
fi

../x.py --stage 2 test \
  ${SKIP_TIDY:+$SKIP_TIDY} \
  --skip compiler \
  --skip src
#!/bin/bash

set -ex

# Run a subset of tests. Used to run tests in parallel in multiple jobs.

# When this job partition is run as part of PR CI, skip tidy to allow revealing more failures. The
# dedicated `tidy` job failing won't block other PR CI jobs from completing, and so tidy failures
# shouldn't inhibit revealing other failures in PR CI jobs.
if [ "$PR_CI_JOB" == "1" ]; then
  echo "PR_CI_JOB set; skipping tidy"
  SKIP_TIDY="--skip tidy"
fi

../x.py --stage 2 test \
  ${SKIP_TIDY:+$SKIP_TIDY} \
  --skip tests \
  --skip coverage-map \
  --skip coverage-run \
  --skip library \
  --skip tidyselftest
---
##[endgroup]
Executing "/scripts/stage_2_test_set1.sh"
+ /scripts/stage_2_test_set1.sh
+ '[' 1 == 1 ']'
+ echo 'PR_CI_JOB set; skipping tidy'
+ SKIP_TIDY='--skip tidy'
+ ../x.py --stage 2 test --skip tidy --skip compiler --skip src
PR_CI_JOB set; skipping tidy
##[group]Building bootstrap
    Finished `dev` profile [unoptimized] target(s) in 0.04s
##[endgroup]
---
test [ui] tests/ui/abi/abi-sysv64-register-usage.rs ... ignored, ignored when the architecture is aarch64
test [ui] tests/ui/abi/abi-typo-unstable.rs#feature_disabled ... ok
test [ui] tests/ui/abi/abi-typo-unstable.rs#feature_enabled ... ok
test [ui] tests/ui/abi/anon-extern-mod.rs ... ok
test [ui] tests/ui/abi/avr-sram.rs#disable_sram ... ok
test [ui] tests/ui/abi/arm-unadjusted-intrinsic.rs#aarch64 ... ok
test [ui] tests/ui/abi/avr-sram.rs#has_sram ... ok
test [ui] tests/ui/abi/avr-sram.rs#no_sram ... ok
test [ui] tests/ui/abi/arm-unadjusted-intrinsic.rs#arm ... ok
test [ui] tests/ui/abi/bad-custom.rs ... ok
test [ui] tests/ui/abi/c-stack-as-value.rs ... ok
test [ui] tests/ui/abi/c-zst.rs#aarch64-darwin ... ok
test [ui] tests/ui/abi/c-zst.rs#powerpc-linux ... ok
---
test [ui] tests/ui/asm/aarch64/type-check-2-2.rs ... ok
test [ui] tests/ui/asm/aarch64/type-check-3.rs ... ok
test [ui] tests/ui/asm/aarch64/type-f16.rs ... ok
test [ui] tests/ui/asm/aarch64/type-check-2.rs ... ok
test [ui] tests/ui/asm/aarch64v8r.rs#hf ... ok
test [ui] tests/ui/asm/aarch64v8r.rs#sf ... ok
test [ui] tests/ui/asm/aarch64v8r.rs#r82 ... ok
test [ui] tests/ui/asm/asm-with-nested-closure.rs ... ok
test [ui] tests/ui/asm/aarch64/sym.rs ... ok
test [ui] tests/ui/asm/binary_asm_labels.rs ... ignored, only executed when the architecture is x86_64
test [ui] tests/ui/asm/arm-low-dreg.rs ... ok
test [ui] tests/ui/asm/cfg-parse-error.rs ... ok
---
test [ui] tests/ui/const-generics/occurs-check/unused-substs-4.rs ... ok
test [ui] tests/ui/const-generics/ogca/basic.rs ... ok
test [ui] tests/ui/const-generics/ogca/basic-fail.rs ... ok
test [ui] tests/ui/const-generics/occurs-check/unused-substs-5.rs ... ok
test [ui] tests/ui/const-generics/ogca/rhs-but-not-root.rs ... ok
test [ui] tests/ui/const-generics/ogca/generic-param-rhs.rs ... ok
test [ui] tests/ui/const-generics/ogca/coherence-ambiguous.rs ... ok
test [ui] tests/ui/const-generics/outer-lifetime-in-const-generic-default.rs ... ok
test [ui] tests/ui/const-generics/opaque_types.rs ... ok
test [ui] tests/ui/const-generics/overlapping_impls.rs ... ok
test [ui] tests/ui/const-generics/opaque_types2.rs ... ok
test [ui] tests/ui/const-generics/params-in-ct-in-ty-param-lazy-norm.rs#min ... ok
---
test [ui] tests/ui/extern/issue-64655-extern-rust-must-allow-unwind.rs#fat2 ... ok
test [ui] tests/ui/extern/issue-64655-extern-rust-must-allow-unwind.rs#fat3 ... ok
test [ui] tests/ui/extern/issue-80074.rs ... ok
test [ui] tests/ui/extern/issue-95829.rs ... ok
test [ui] tests/ui/extern/lgamma-linkage.rs ... ok
test [ui] tests/ui/extern/no-mangle-associated-fn.rs ... ok
test [ui] tests/ui/extern/not-in-block.rs ... ok
test [ui] tests/ui/extern/unsized-extern-derefmove.rs ... ok
test [ui] tests/ui/extern/windows-tcb-trash-13259.rs ... ok
test [ui] tests/ui/feature-gates/allow-features-empty.rs ... ok
---
test [ui] tests/ui/feature-gates/feature-gate-macro-derive.rs ... ok
test [ui] tests/ui/feature-gates/feature-gate-macro-metavar-expr-concat.rs ... ok
test [ui] tests/ui/feature-gates/feature-gate-marker_trait_attr.rs ... ok
test [ui] tests/ui/feature-gates/feature-gate-may-dangle.rs ... ok
test [ui] tests/ui/feature-gates/feature-gate-mgca-type-const-syntax.rs ... ok
test [ui] tests/ui/feature-gates/feature-gate-min-generic-const-args.rs ... ok
test [ui] tests/ui/feature-gates/feature-gate-movrs_target_feature.rs ... ignored, only executed when the architecture is x86_64
test [ui] tests/ui/feature-gates/feature-gate-min_const_fn.rs ... ok
test [ui] tests/ui/feature-gates/feature-gate-more-maybe-bounds.rs ... ok
test [ui] tests/ui/feature-gates/feature-gate-naked_functions_rustic_abi.rs ... ignored, only executed when the architecture is x86_64
---
test [ui] tests/ui/imports/ambiguous-9.rs ... ok
test [ui] tests/ui/imports/ambiguous-import-visibility-module.rs ... ok
test [ui] tests/ui/imports/ambiguous-8.rs ... ok
test [ui] tests/ui/imports/ambiguous-glob-vs-expanded-extern.rs ... ok
test [ui] tests/ui/imports/ambiguous-panic-glob-vs-multiouter.rs ... ok
test [ui] tests/ui/imports/ambiguous-panic-globvsglob.rs ... ok
test [ui] tests/ui/imports/ambiguous-panic-no-implicit-prelude.rs ... ok
test [ui] tests/ui/imports/ambiguous-panic-non-prelude-core-glob.rs ... ok
test [ui] tests/ui/imports/ambiguous-panic-non-prelude-std-glob.rs ... ok
test [ui] tests/ui/imports/ambiguous-panic-pick-core.rs ... ok
test [ui] tests/ui/imports/ambiguous-panic-pick-std.rs ... ok
---
test [ui] tests/ui/layout/post-mono-layout-cycle.rs ... ok
test [ui] tests/ui/layout/randomize.rs#randomize-layout ... ok
test [ui] tests/ui/layout/randomize.rs#normal ... ok
test [ui] tests/ui/layout/null-pointer-optimization.rs ... ok
test [ui] tests/ui/layout/rigid-alias-due-to-broken-impl.rs ... ok
test [ui] tests/ui/layout/size-of-val-raw-too-big.rs ... ignored, only executed when the pointer width is 32bit (Layout computation rejects this layout for different reasons on 64-bit.)
test [ui] tests/ui/layout/reprc-power-alignment.rs ... ok
test [ui] tests/ui/layout/struct.rs ... ok
test [ui] tests/ui/layout/rust-call-abi-not-a-tuple-ice-81974.rs ... ok
test [ui] tests/ui/layout/rigid-alias-no-params.rs ... ok
---
diff of stderr:

61    |     ^^^^^^^^ required by this bound in `S`
62 
63 error[E0275]: overflow evaluating the requirement `S<U> well-formed`
-   --> $DIR/const-ctor-overflow-eval.rs:8:35
+   --> $DIR/const-ctor-overflow-eval.rs:14:5
65    |
- LL | #[derive(ConstParamTy, PartialEq, Eq)]
-    |                                   ^^
+ LL |     S<{ U }>:;
+    |     ^^^^^^^^
68    |
69 note: required by a bound in `S`
70   --> $DIR/const-ctor-overflow-eval.rs:14:5

74 LL | where
75 LL |     S<{ U }>:;
76    |     ^^^^^^^^ required by this bound in `S`
+    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
77 
78 error: aborting due to 5 previous errors
79 

Note: some mismatched output was normalized before being compared
-   --> /checkout/tests/ui/const-generics/mgca/const-ctor-overflow-eval.rs:14:5
+   --> $DIR/const-ctor-overflow-eval.rs:14:5
+ LL |     S<{ U }>:;
+    |     ^^^^^^^^
+    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`


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 const-generics/mgca/const-ctor-overflow-eval.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/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/const-generics/mgca/const-ctor-overflow-eval.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/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--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/aarch64-unknown-linux-gnu/test/ui/const-generics/mgca/const-ctor-overflow-eval" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error[E0275]: overflow evaluating the requirement `S<U> well-formed`
##[error]  --> /checkout/tests/ui/const-generics/mgca/const-ctor-overflow-eval.rs:14:5
   |
LL |     S<{ U }>:;
   |     ^^^^^^^^
   |
note: required by a bound in `S`
  --> /checkout/tests/ui/const-generics/mgca/const-ctor-overflow-eval.rs:14:5
   |
LL | struct S<const N: U>()
   |        - required by a bound in this struct
LL | where
LL |     S<{ U }>:;
   |     ^^^^^^^^ required by this bound in `S`

error[E0275]: overflow evaluating the requirement `S<U> well-formed`
##[error]  --> /checkout/tests/ui/const-generics/mgca/const-ctor-overflow-eval.rs:14:5
   |
LL |     S<{ U }>:;
   |     ^^^^^^^^
   |
note: required by a bound in `S`
  --> /checkout/tests/ui/const-generics/mgca/const-ctor-overflow-eval.rs:14:5
   |
LL | struct S<const N: U>()
   |        - required by a bound in this struct
LL | where
LL |     S<{ U }>:;
   |     ^^^^^^^^ required by this bound in `S`
   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`

error[E0275]: overflow evaluating the requirement `S<U> well-formed`
##[error]  --> /checkout/tests/ui/const-generics/mgca/const-ctor-overflow-eval.rs:14:5
   |
LL |     S<{ U }>:;
   |     ^^^^^^^^
   |
note: required by a bound in `S`
  --> /checkout/tests/ui/const-generics/mgca/const-ctor-overflow-eval.rs:14:5
   |
LL | struct S<const N: U>()
   |        - required by a bound in this struct
LL | where
LL |     S<{ U }>:;
   |     ^^^^^^^^ required by this bound in `S`
   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`

error[E0275]: overflow evaluating the requirement `S<U> well-formed`
##[error]  --> /checkout/tests/ui/const-generics/mgca/const-ctor-overflow-eval.rs:8:24
   |
LL | #[derive(ConstParamTy, PartialEq, Eq)]
   |                        ^^^^^^^^^
   |
note: required by a bound in `S`
  --> /checkout/tests/ui/const-generics/mgca/const-ctor-overflow-eval.rs:14:5
   |
LL | struct S<const N: U>()
   |        - required by a bound in this struct
LL | where
LL |     S<{ U }>:;
   |     ^^^^^^^^ required by this bound in `S`

error[E0275]: overflow evaluating the requirement `S<U> well-formed`
##[error]  --> /checkout/tests/ui/const-generics/mgca/const-ctor-overflow-eval.rs:14:5
   |
LL |     S<{ U }>:;
   |     ^^^^^^^^
   |
note: required by a bound in `S`
  --> /checkout/tests/ui/const-generics/mgca/const-ctor-overflow-eval.rs:14:5
   |
LL | struct S<const N: U>()
   |        - required by a bound in this struct
LL | where
LL |     S<{ U }>:;
   |     ^^^^^^^^ required by this bound in `S`
   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`

error: aborting due to 5 previous errors

For more information about this error, try `rustc --explain E0275`.
------------------------------------------

---- [ui] tests/ui/const-generics/mgca/const-ctor-overflow-eval.rs stdout end ----
---- [ui] tests/ui/duplicate/multiple-types-with-same-name-and-derive.rs stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/duplicate/multiple-types-with-same-name-and-derive/multiple-types-with-same-name-and-derive.stderr`
diff of stderr:

59    |        ^^^^^
60    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
61 
+ error[E0107]: struct takes 0 generic arguments but 1 generic argument was supplied
+   --> $DIR/multiple-types-with-same-name-and-derive.rs:12:8
+    |
+ LL | struct NotSM<T>(T);
+    |        ^^^^^ expected 0 generic arguments
+    |
+ note: struct defined here, with 0 generic parameters
+   --> $DIR/multiple-types-with-same-name-and-derive.rs:8:8
+    |
+ LL | struct NotSM;
+    |        ^^^^^
+    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+ 
62 error[E0609]: no field `0` on type `&NotSM`
63   --> $DIR/multiple-types-with-same-name-and-derive.rs:12:17
64    |

65 LL | struct NotSM<T>(T);
66    |                 ^ unknown field
67 
- error: aborting due to 6 previous errors
+ error: aborting due to 7 previous errors
69 
---
-   --> /checkout/tests/ui/duplicate/multiple-types-with-same-name-and-derive.rs:8:8
+ error[E0107]: struct takes 0 generic arguments but 1 generic argument was supplied
+   --> $DIR/multiple-types-with-same-name-and-derive.rs:12:8
+    |
+ LL | struct NotSM<T>(T);
+    |        ^^^^^ expected 0 generic arguments
+    |
+ note: struct defined here, with 0 generic parameters
+   --> $DIR/multiple-types-with-same-name-and-derive.rs:8:8
+    |
+ LL | struct NotSM;
+    |        ^^^^^
+    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+ 
+ error: aborting due to 7 previous errors


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 duplicate/multiple-types-with-same-name-and-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/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/duplicate/multiple-types-with-same-name-and-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/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--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/aarch64-unknown-linux-gnu/test/ui/duplicate/multiple-types-with-same-name-and-derive" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error[E0428]: the name `NotSM` is defined multiple times
##[error]  --> /checkout/tests/ui/duplicate/multiple-types-with-same-name-and-derive.rs:12:1
   |
LL | struct NotSM;
   | ------------- previous definition of the type `NotSM` here
...
LL | struct NotSM<T>(T);
   | ^^^^^^^^^^^^^^^^^^^ `NotSM` redefined here
   |
   = note: `NotSM` must be defined only once in the type namespace of this module

error[E0107]: struct takes 0 generic arguments but 1 generic argument was supplied
##[error]  --> /checkout/tests/ui/duplicate/multiple-types-with-same-name-and-derive.rs:12:8
   |
LL | struct NotSM<T>(T);
   |        ^^^^^ expected 0 generic arguments
   |
note: struct defined here, with 0 generic parameters
  --> /checkout/tests/ui/duplicate/multiple-types-with-same-name-and-derive.rs:8:8
   |
LL | struct NotSM;
---

error[E0107]: struct takes 0 generic arguments but 1 generic argument was supplied
##[error]  --> /checkout/tests/ui/duplicate/multiple-types-with-same-name-and-derive.rs:12:8
   |
LL | struct NotSM<T>(T);
   |        ^^^^^ expected 0 generic arguments
   |
note: struct defined here, with 0 generic parameters
  --> /checkout/tests/ui/duplicate/multiple-types-with-same-name-and-derive.rs:8:8
   |
LL | struct NotSM;
   |        ^^^^^
   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`

error[E0107]: struct takes 0 generic arguments but 1 generic argument was supplied
##[error]  --> /checkout/tests/ui/duplicate/multiple-types-with-same-name-and-derive.rs:12:8
   |
LL | struct NotSM<T>(T);
   |        ^^^^^ expected 0 generic arguments
   |
note: struct defined here, with 0 generic parameters
  --> /checkout/tests/ui/duplicate/multiple-types-with-same-name-and-derive.rs:8:8
   |
LL | struct NotSM;
   |        ^^^^^
   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`

error[E0107]: struct takes 0 generic arguments but 1 generic argument was supplied
##[error]  --> /checkout/tests/ui/duplicate/multiple-types-with-same-name-and-derive.rs:12:8
   |
LL | struct NotSM<T>(T);
   |        ^^^^^ expected 0 generic arguments
   |
note: struct defined here, with 0 generic parameters
  --> /checkout/tests/ui/duplicate/multiple-types-with-same-name-and-derive.rs:8:8
   |
LL | struct NotSM;
   |        ^^^^^
   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`

error[E0609]: no field `0` on type `&NotSM`
##[error]  --> /checkout/tests/ui/duplicate/multiple-types-with-same-name-and-derive.rs:12:17
   |
LL | struct NotSM<T>(T);
   |                 ^ unknown field

error: aborting due to 7 previous errors

Some errors have detailed explanations: E0107, E0428, E0609.
---
20    |

+ help: consider introducing lifetime `'b` here
+    |
+ LL | <'b>#[derive(Eq, PartialEq)]
+    | ++++
21 help: consider introducing lifetime `'b` here
22    |
23 LL | struct Test<'b> {


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 lifetimes/undeclared-lifetime-used-in-debug-macro-issue-70152.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/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/lifetimes/undeclared-lifetime-used-in-debug-macro-issue-70152.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/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--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/aarch64-unknown-linux-gnu/test/ui/lifetimes/undeclared-lifetime-used-in-debug-macro-issue-70152" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error[E0261]: use of undeclared lifetime name `'b`
##[error]  --> /checkout/tests/ui/lifetimes/undeclared-lifetime-used-in-debug-macro-issue-70152.rs:3:9
   |
---
   |         ^^ undeclared lifetime
   |
help: consider introducing lifetime `'b` here
   |
LL | <'b>#[derive(Eq, PartialEq)]
   | ++++
help: consider introducing lifetime `'b` here
   |
LL | struct Test<'b> {
   |            ++++

error[E0261]: use of undeclared lifetime name `'b`
##[error]  --> /checkout/tests/ui/lifetimes/undeclared-lifetime-used-in-debug-macro-issue-70152.rs:13:13
   |
LL |     fn foo(&'b self) {} //~ ERROR use of undeclared lifetime name `'b`
   |             ^^ undeclared lifetime
   |
help: consider introducing lifetime `'b` here
   |
LL |     fn foo<'b>(&'b self) {} //~ ERROR use of undeclared lifetime name `'b`
   |           ++++
help: consider introducing lifetime `'b` here
   |
LL | impl<'b> T for Test {
   |     ++++

error: aborting due to 3 previous errors

For more information about this error, try `rustc --explain E0261`.
------------------------------------------

---- [ui] tests/ui/lifetimes/undeclared-lifetime-used-in-debug-macro-issue-70152.rs stdout end ----
---- [ui] tests/ui/stats/macro-stats.rs stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/stats/macro-stats/macro-stats.stderr`
diff of stderr:

8 macro-stats q!                                    1         26       26.0        519      519.0
9 macro-stats #[derive(Ord)]                        1         15       15.0        503      503.0
10 macro-stats #[derive(Default)]                    2         16        8.0        403      201.5
- macro-stats #[derive(Eq)]                         1         10       10.0        298      298.0
+ macro-stats #[derive(Eq)]                         1         11       11.0        311      311.0
12 macro-stats #[derive(Debug)]                      1          8        8.0        277      277.0
13 macro-stats #[derive(PartialEq)]                  1          9        9.0        267      267.0
14 macro-stats #[derive(Copy)]                       1          2        2.0         61       61.0


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 stats/macro-stats.rs`

error: 1 errors occurred comparing output.
status: exit status: 0
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/stats/macro-stats.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/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--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/aarch64-unknown-linux-gnu/test/ui/stats/macro-stats" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "-Zmacro-stats"
stdout: none
--- stderr -------------------------------
macro-stats ===================================================================================
macro-stats MACRO EXPANSION STATS: macro_stats
macro-stats Macro Name                         Uses      Lines  Avg Lines      Bytes  Avg Bytes
macro-stats -----------------------------------------------------------------------------------
macro-stats #[derive(Clone)]                      8         67        8.4      1_879      234.9
macro-stats #[derive(PartialOrd)]                 1         17       17.0        675      675.0
macro-stats #[derive(Hash)]                       2         17        8.5        565      282.5
macro-stats q!                                    1         26       26.0        519      519.0
macro-stats #[derive(Ord)]                        1         15       15.0        503      503.0
macro-stats #[derive(Default)]                    2         16        8.0        403      201.5
macro-stats #[derive(Eq)]                         1         11       11.0        311      311.0
macro-stats #[derive(Debug)]                      1          8        8.0        277      277.0
macro-stats #[derive(PartialEq)]                  1          9        9.0        267      267.0
macro-stats #[derive(Copy)]                       1          2        2.0         61       61.0
macro-stats p!                                    1          3        3.0         32       32.0
macro-stats trait_impl_tys!                       1          2        2.0         28       28.0
macro-stats foreign_item!                         1          1        1.0         21       21.0
macro-stats long_name_that_doesnt_fit_on_one_line!
macro-stats                                       1          1        1.0         18       18.0
macro-stats impl_const!                           1          1        1.0         17       17.0
macro-stats trait_tys!                            1          2        2.0         15       15.0
macro-stats n99!                                  2          2        1.0          4        2.0
macro-stats none!                                 1          1        1.0          4        4.0
macro-stats u32!                                  1          1        1.0          3        3.0
macro-stats long_name_that_fits_on_one_line!     10         10        1.0          0        0.0
macro-stats long_name_that_fits_on_one_line_____! 1          1        1.0          0        0.0
macro-stats long_name_that_fits_on_one_line____!  1          1        1.0          0        0.0
macro-stats long_name_that_fits_on_one_line___!   1          1        1.0          0        0.0
macro-stats long_name_that_fits_on_one_line__!    1          1        1.0          0        0.0
macro-stats long_name_that_fits_on_one_line_!     1          1        1.0          0        0.0
macro-stats #[test]                               1          1        1.0          0        0.0
macro-stats ===================================================================================
------------------------------------------

---- [ui] tests/ui/stats/macro-stats.rs stdout end ----
---- [ui] tests/ui/symbol-names/const-generics-structural-demangling.rs stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/symbol-names/const-generics-structural-demangling/const-generics-structural-demangling.stderr`
diff of stderr:

124 LL | #[rustc_symbol_name]
125    | ^^^^^^^^^^^^^^^^^^^^
126 
- error: symbol-name(_RMsd_CsCRATE_HASH_1cINtB<REF>_4Bar_KVNtB<REF>_3BarS1xh7b_s_1xt1000_EE)
+ error: symbol-name(_RMsf_CsCRATE_HASH_1cINtB<REF>_4Bar_KVNtB<REF>_3BarS1xh7b_s_1xt1000_EE)
128   --> $DIR/const-generics-structural-demangling.rs:93:5
129    |
130 LL |     #[rustc_symbol_name]

Note: some mismatched output was normalized before being compared
- error: symbol-name(_RMsf_Cs6IRxgSShgKb_1cINtB3_4Bar_KVNtB3_3BarS1xh7b_s_1xt1000_EE)
-   --> /checkout/tests/ui/symbol-names/const-generics-structural-demangling.rs:93:5
+ error: symbol-name(_RMsf_CsCRATE_HASH_1cINtB<REF>_4Bar_KVNtB<REF>_3BarS1xh7b_s_1xt1000_EE)


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 symbol-names/const-generics-structural-demangling.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/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/symbol-names/const-generics-structural-demangling.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/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--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" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/symbol-names/const-generics-structural-demangling" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "-C" "symbol-mangling-version=v0" "--crate-name=c"
stdout: none
--- stderr -------------------------------
error: symbol-name(_RMCs6IRxgSShgKb_1cINtB0_7RefByteKRh7b_E)
##[error]  --> /checkout/tests/ui/symbol-names/const-generics-structural-demangling.rs:13:1
   |
LL | #[rustc_symbol_name]
   | ^^^^^^^^^^^^^^^^^^^^

error: demangling(<c[4e5061322b75ab09]::RefByte<{&123u8}>>)
##[error]  --> /checkout/tests/ui/symbol-names/const-generics-structural-demangling.rs:13:1
   |
LL | #[rustc_symbol_name]
   | ^^^^^^^^^^^^^^^^^^^^

error: demangling-alt(<c::RefByte<{&123}>>)
##[error]  --> /checkout/tests/ui/symbol-names/const-generics-structural-demangling.rs:13:1
   |
LL | #[rustc_symbol_name]
   | ^^^^^^^^^^^^^^^^^^^^

error: symbol-name(_RMs_Cs6IRxgSShgKb_1cINtB2_6RefZstKRAEE)
##[error]  --> /checkout/tests/ui/symbol-names/const-generics-structural-demangling.rs:23:1
   |
LL | #[rustc_symbol_name]
   | ^^^^^^^^^^^^^^^^^^^^

error: demangling(<c[4e5061322b75ab09]::RefZst<{&[]}>>)
##[error]  --> /checkout/tests/ui/symbol-names/const-generics-structural-demangling.rs:23:1
   |
LL | #[rustc_symbol_name]
   | ^^^^^^^^^^^^^^^^^^^^

error: demangling-alt(<c::RefZst<{&[]}>>)
##[error]  --> /checkout/tests/ui/symbol-names/const-generics-structural-demangling.rs:23:1
   |
LL | #[rustc_symbol_name]
   | ^^^^^^^^^^^^^^^^^^^^

error: symbol-name(_RMs0_Cs6IRxgSShgKb_1cINtB3_11Array3BytesKAh1_h2_h3_EE)
##[error]  --> /checkout/tests/ui/symbol-names/const-generics-structural-demangling.rs:31:1
   |
LL | #[rustc_symbol_name]
   | ^^^^^^^^^^^^^^^^^^^^

error: demangling(<c[4e5061322b75ab09]::Array3Bytes<{[1u8, 2u8, 3u8]}>>)
##[error]  --> /checkout/tests/ui/symbol-names/const-generics-structural-demangling.rs:31:1
   |
LL | #[rustc_symbol_name]
   | ^^^^^^^^^^^^^^^^^^^^

error: demangling-alt(<c::Array3Bytes<{[1, 2, 3]}>>)
##[error]  --> /checkout/tests/ui/symbol-names/const-generics-structural-demangling.rs:31:1
   |
LL | #[rustc_symbol_name]
   | ^^^^^^^^^^^^^^^^^^^^

error: symbol-name(_RMs1_Cs6IRxgSShgKb_1cINtB3_13TupleByteBoolKTh1_b0_EE)
##[error]  --> /checkout/tests/ui/symbol-names/const-generics-structural-demangling.rs:39:1
   |
LL | #[rustc_symbol_name]
   | ^^^^^^^^^^^^^^^^^^^^

error: demangling(<c[4e5061322b75ab09]::TupleByteBool<{(1u8, false)}>>)
##[error]  --> /checkout/tests/ui/symbol-names/const-generics-structural-demangling.rs:39:1
   |
LL | #[rustc_symbol_name]
   | ^^^^^^^^^^^^^^^^^^^^

error: demangling-alt(<c::TupleByteBool<{(1, false)}>>)
##[error]  --> /checkout/tests/ui/symbol-names/const-generics-structural-demangling.rs:39:1
   |
LL | #[rustc_symbol_name]
   | ^^^^^^^^^^^^^^^^^^^^

error: symbol-name(_RMs2_Cs6IRxgSShgKb_1cINtB3_11OptionUsizeKVNtINtB3_8MyOptionjE4NoneUE)
##[error]  --> /checkout/tests/ui/symbol-names/const-generics-structural-demangling.rs:55:1
   |
LL | #[rustc_symbol_name]
   | ^^^^^^^^^^^^^^^^^^^^

error: demangling(<c[4e5061322b75ab09]::OptionUsize<{c[4e5061322b75ab09]::MyOption::<usize>::None}>>)
##[error]  --> /checkout/tests/ui/symbol-names/const-generics-structural-demangling.rs:55:1
   |
LL | #[rustc_symbol_name]
   | ^^^^^^^^^^^^^^^^^^^^

error: demangling-alt(<c::OptionUsize<{c::MyOption::<usize>::None}>>)
##[error]  --> /checkout/tests/ui/symbol-names/const-generics-structural-demangling.rs:55:1
   |
LL | #[rustc_symbol_name]
   | ^^^^^^^^^^^^^^^^^^^^

error: symbol-name(_RMs3_Cs6IRxgSShgKb_1cINtB3_11OptionUsizeKVNtINtB3_8MyOptionjE4SomeTj0_EE)
##[error]  --> /checkout/tests/ui/symbol-names/const-generics-structural-demangling.rs:63:1
   |
LL | #[rustc_symbol_name]
   | ^^^^^^^^^^^^^^^^^^^^

error: demangling(<c[4e5061322b75ab09]::OptionUsize<{c[4e5061322b75ab09]::MyOption::<usize>::Some(0usize)}>>)
##[error]  --> /checkout/tests/ui/symbol-names/const-generics-structural-demangling.rs:63:1
   |
LL | #[rustc_symbol_name]
   | ^^^^^^^^^^^^^^^^^^^^

error: demangling-alt(<c::OptionUsize<{c::MyOption::<usize>::Some(0)}>>)
##[error]  --> /checkout/tests/ui/symbol-names/const-generics-structural-demangling.rs:63:1
   |
LL | #[rustc_symbol_name]
   | ^^^^^^^^^^^^^^^^^^^^

error: symbol-name(_RMs4_Cs6IRxgSShgKb_1cINtB3_4Foo_KVNtB3_3FooS1sRe616263_2chc78_5sliceRAh1_h2_h3_EEE)
##[error]  --> /checkout/tests/ui/symbol-names/const-generics-structural-demangling.rs:77:1
   |
LL | #[rustc_symbol_name]
   | ^^^^^^^^^^^^^^^^^^^^

error: demangling(<c[4e5061322b75ab09]::Foo_<{c[4e5061322b75ab09]::Foo { s: "abc", ch: 'x', slice: &[1u8, 2u8, 3u8] }}>>)
##[error]  --> /checkout/tests/ui/symbol-names/const-generics-structural-demangling.rs:77:1
   |
LL | #[rustc_symbol_name]
   | ^^^^^^^^^^^^^^^^^^^^

error: demangling-alt(<c::Foo_<{c::Foo { s: "abc", ch: 'x', slice: &[1, 2, 3] }}>>)
##[error]  --> /checkout/tests/ui/symbol-names/const-generics-structural-demangling.rs:77:1
   |
LL | #[rustc_symbol_name]
   | ^^^^^^^^^^^^^^^^^^^^

error: symbol-name(_RMsf_Cs6IRxgSShgKb_1cINtB3_4Bar_KVNtB3_3BarS1xh7b_s_1xt1000_EE)
##[error]  --> /checkout/tests/ui/symbol-names/const-generics-structural-demangling.rs:93:5
   |
LL |     #[rustc_symbol_name]
   |     ^^^^^^^^^^^^^^^^^^^^
...
LL | duplicate_field_name_test!(x);
   | ----------------------------- in this macro invocation
   |
   = note: this error originates in the macro `duplicate_field_name_test` (in Nightly builds, run with -Z macro-backtrace for more info)

error: demangling(<c[4e5061322b75ab09]::Bar_<{c[4e5061322b75ab09]::Bar { x: 123u8, x: 4096u16 }}>>)
##[error]  --> /checkout/tests/ui/symbol-names/const-generics-structural-demangling.rs:93:5
   |
LL |     #[rustc_symbol_name]
   |     ^^^^^^^^^^^^^^^^^^^^
...
LL | duplicate_field_name_test!(x);
   | ----------------------------- in this macro invocation
   |
   = note: this error originates in the macro `duplicate_field_name_test` (in Nightly builds, run with -Z macro-backtrace for more info)

error: demangling-alt(<c::Bar_<{c::Bar { x: 123, x: 4096 }}>>)
##[error]  --> /checkout/tests/ui/symbol-names/const-generics-structural-demangling.rs:93:5
   |
LL |     #[rustc_symbol_name]
   |     ^^^^^^^^^^^^^^^^^^^^
...

</details>

rust-log-analyzer rust-log-analyzer commented on Feb 26, 2026 16:54 UTC
Contributor

The job aarch64-gnu-llvm-20-1 failed! Check out the build log: (web) (plain enhanced) (plain)

<details><summary><i>Click to see the possible cause of the failure (guessed by this bot)</i></summary>

/dev/sda15       98M  6.4M   92M   7% /boot/efi
tmpfs           1.6G   16K  1.6G   1% /run/user/1001
================================================================================

Sufficient disk space available (120900876KB >= 52428800KB). Skipping cleanup.
##[group]Run echo "[CI_PR_NUMBER=$num]"
echo "[CI_PR_NUMBER=$num]"
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
---
set -ex

# Run a subset of tests. Used to run tests in parallel in multiple jobs.

# When this job partition is run as part of PR CI, skip tidy to allow revealing more failures. The
# dedicated `tidy` job failing won't block other PR CI jobs from completing, and so tidy failures
# shouldn't inhibit revealing other failures in PR CI jobs.
if [ "$PR_CI_JOB" == "1" ]; then
  echo "PR_CI_JOB set; skipping tidy"
  SKIP_TIDY="--skip tidy"
fi

../x.py --stage 2 test \
  ${SKIP_TIDY:+$SKIP_TIDY} \
  --skip compiler \
  --skip src
#!/bin/bash

set -ex

# Run a subset of tests. Used to run tests in parallel in multiple jobs.

# When this job partition is run as part of PR CI, skip tidy to allow revealing more failures. The
# dedicated `tidy` job failing won't block other PR CI jobs from completing, and so tidy failures
# shouldn't inhibit revealing other failures in PR CI jobs.
if [ "$PR_CI_JOB" == "1" ]; then
  echo "PR_CI_JOB set; skipping tidy"
  SKIP_TIDY="--skip tidy"
fi

../x.py --stage 2 test \
  ${SKIP_TIDY:+$SKIP_TIDY} \
  --skip tests \
  --skip coverage-map \
  --skip coverage-run \
  --skip library \
  --skip tidyselftest
---
Executing "/scripts/stage_2_test_set1.sh"
+ /scripts/stage_2_test_set1.sh
PR_CI_JOB set; skipping tidy
+ '[' 1 == 1 ']'
+ echo 'PR_CI_JOB set; skipping tidy'
+ SKIP_TIDY='--skip tidy'
+ ../x.py --stage 2 test --skip tidy --skip compiler --skip src
##[group]Building bootstrap
    Finished `dev` profile [unoptimized] target(s) in 0.04s
##[endgroup]
downloading https://static.rust-lang.org/dist/2026-01-21/rustfmt-nightly-aarch64-unknown-linux-gnu.tar.xz
---
test [ui] tests/ui/abi/abi-sysv64-register-usage.rs ... ignored, ignored when the architecture is aarch64
test [ui] tests/ui/abi/abi-typo-unstable.rs#feature_disabled ... ok
test [ui] tests/ui/abi/abi-typo-unstable.rs#feature_enabled ... ok
test [ui] tests/ui/abi/anon-extern-mod.rs ... ok
test [ui] tests/ui/abi/avr-sram.rs#disable_sram ... ok
test [ui] tests/ui/abi/arm-unadjusted-intrinsic.rs#aarch64 ... ok
test [ui] tests/ui/abi/avr-sram.rs#has_sram ... ok
test [ui] tests/ui/abi/avr-sram.rs#no_sram ... ok
test [ui] tests/ui/abi/arm-unadjusted-intrinsic.rs#arm ... ok
test [ui] tests/ui/abi/bad-custom.rs ... ok
test [ui] tests/ui/abi/c-stack-as-value.rs ... ok
test [ui] tests/ui/abi/c-zst.rs#aarch64-darwin ... ok
test [ui] tests/ui/abi/c-zst.rs#powerpc-linux ... ok
---
test [ui] tests/ui/asm/aarch64/may_unwind.rs ... ok
test [ui] tests/ui/asm/aarch64/type-check-2.rs ... ok
test [ui] tests/ui/asm/aarch64/type-check-3.rs ... ok
test [ui] tests/ui/asm/aarch64/type-f16.rs ... ok
test [ui] tests/ui/asm/aarch64v8r.rs#r82 ... ok
test [ui] tests/ui/asm/aarch64v8r.rs#hf ... ok
test [ui] tests/ui/asm/aarch64v8r.rs#sf ... ok
test [ui] tests/ui/asm/aarch64/sym.rs ... ok
test [ui] tests/ui/asm/asm-with-nested-closure.rs ... ok
test [ui] tests/ui/asm/binary_asm_labels.rs ... ignored, only executed when the architecture is x86_64
test [ui] tests/ui/asm/arm-low-dreg.rs ... ok
test [ui] tests/ui/asm/cfg-parse-error.rs ... ok
---
test [ui] tests/ui/const-generics/occurs-check/unused-substs-2.rs ... ok
test [ui] tests/ui/const-generics/occurs-check/unused-substs-3.rs ... ok
test [ui] tests/ui/const-generics/occurs-check/unused-substs-5.rs ... ok
test [ui] tests/ui/const-generics/occurs-check/unused-substs-4.rs ... ok
test [ui] tests/ui/const-generics/ogca/basic-fail.rs ... ok
test [ui] tests/ui/const-generics/ogca/basic.rs ... ok
test [ui] tests/ui/const-generics/ogca/generic-param-rhs.rs ... ok
test [ui] tests/ui/const-generics/ogca/coherence-ambiguous.rs ... ok
test [ui] tests/ui/const-generics/ogca/rhs-but-not-root.rs ... ok
test [ui] tests/ui/const-generics/outer-lifetime-in-const-generic-default.rs ... ok
test [ui] tests/ui/const-generics/opaque_types.rs ... ok
test [ui] tests/ui/const-generics/overlapping_impls.rs ... ok
test [ui] tests/ui/const-generics/opaque_types2.rs ... ok
test [ui] tests/ui/const-generics/params-in-ct-in-ty-param-lazy-norm.rs#full ... ok
---
test [ui] tests/ui/extern/issue-64655-extern-rust-must-allow-unwind.rs#fat2 ... ok
test [ui] tests/ui/extern/issue-64655-extern-rust-must-allow-unwind.rs#fat3 ... ok
test [ui] tests/ui/extern/issue-80074.rs ... ok
test [ui] tests/ui/extern/issue-95829.rs ... ok
test [ui] tests/ui/extern/lgamma-linkage.rs ... ok
test [ui] tests/ui/extern/issue-64655-extern-rust-must-allow-unwind.rs#thin1 ... ok
test [ui] tests/ui/extern/not-in-block.rs ... ok
test [ui] tests/ui/extern/no-mangle-associated-fn.rs ... ok
test [ui] tests/ui/extern/unsized-extern-derefmove.rs ... ok
test [ui] tests/ui/feature-gates/allow-features-empty.rs ... ok
---
test [ui] tests/ui/feature-gates/feature-gate-macro-derive.rs ... ok
test [ui] tests/ui/feature-gates/feature-gate-macro-metavar-expr-concat.rs ... ok
test [ui] tests/ui/feature-gates/feature-gate-marker_trait_attr.rs ... ok
test [ui] tests/ui/feature-gates/feature-gate-may-dangle.rs ... ok
test [ui] tests/ui/feature-gates/feature-gate-mgca-type-const-syntax.rs ... ok
test [ui] tests/ui/feature-gates/feature-gate-min-generic-const-args.rs ... ok
test [ui] tests/ui/feature-gates/feature-gate-movrs_target_feature.rs ... ignored, only executed when the architecture is x86_64
test [ui] tests/ui/feature-gates/feature-gate-more-maybe-bounds.rs ... ok
test [ui] tests/ui/feature-gates/feature-gate-min_const_fn.rs ... ok
test [ui] tests/ui/feature-gates/feature-gate-naked_functions_rustic_abi.rs ... ignored, only executed when the architecture is x86_64
---
test [ui] tests/ui/imports/ambiguous-9.rs ... ok
test [ui] tests/ui/imports/ambiguous-import-visibility-module.rs ... ok
test [ui] tests/ui/imports/ambiguous-glob-vs-expanded-extern.rs ... ok
test [ui] tests/ui/imports/ambiguous-8.rs ... ok
test [ui] tests/ui/imports/ambiguous-panic-glob-vs-multiouter.rs ... ok
test [ui] tests/ui/imports/ambiguous-panic-globvsglob.rs ... ok
test [ui] tests/ui/imports/ambiguous-panic-non-prelude-core-glob.rs ... ok
test [ui] tests/ui/imports/ambiguous-panic-no-implicit-prelude.rs ... ok
test [ui] tests/ui/imports/ambiguous-panic-non-prelude-std-glob.rs ... ok
test [ui] tests/ui/imports/ambiguous-panic-pick-core.rs ... ok
test [ui] tests/ui/imports/ambiguous-panic-pick-std.rs ... ok
---
test [ui] tests/ui/layout/post-mono-layout-cycle.rs ... ok
test [ui] tests/ui/layout/randomize.rs#normal ... ok
test [ui] tests/ui/layout/randomize.rs#randomize-layout ... ok
test [ui] tests/ui/layout/null-pointer-optimization.rs ... ok
test [ui] tests/ui/layout/rigid-alias-due-to-broken-impl.rs ... ok
test [ui] tests/ui/layout/size-of-val-raw-too-big.rs ... ignored, only executed when the pointer width is 32bit (Layout computation rejects this layout for different reasons on 64-bit.)
test [ui] tests/ui/layout/reprc-power-alignment.rs ... ok
test [ui] tests/ui/layout/struct.rs ... ok
test [ui] tests/ui/layout/rust-call-abi-not-a-tuple-ice-81974.rs ... ok
test [ui] tests/ui/layout/thaw-transmute-invalid-enum.rs ... ok
---
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/duplicate/multiple-types-with-same-name-and-derive/multiple-types-with-same-name-and-derive.stderr`
diff of stderr:

59    |        ^^^^^
60    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
61 
+ error[E0107]: struct takes 0 generic arguments but 1 generic argument was supplied
+   --> $DIR/multiple-types-with-same-name-and-derive.rs:12:8
+    |
+ LL | struct NotSM<T>(T);
+    |        ^^^^^ expected 0 generic arguments
+    |
+ note: struct defined here, with 0 generic parameters
+   --> $DIR/multiple-types-with-same-name-and-derive.rs:8:8
+    |
+ LL | struct NotSM;
+    |        ^^^^^
+    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+ 
62 error[E0609]: no field `0` on type `&NotSM`
63   --> $DIR/multiple-types-with-same-name-and-derive.rs:12:17
64    |

65 LL | struct NotSM<T>(T);
66    |                 ^ unknown field
67 
- error: aborting due to 6 previous errors
+ error: aborting due to 7 previous errors
69 
---
-   --> /checkout/tests/ui/duplicate/multiple-types-with-same-name-and-derive.rs:8:8
+ error[E0107]: struct takes 0 generic arguments but 1 generic argument was supplied
+   --> $DIR/multiple-types-with-same-name-and-derive.rs:12:8
+    |
+ LL | struct NotSM<T>(T);
+    |        ^^^^^ expected 0 generic arguments
+    |
+ note: struct defined here, with 0 generic parameters
+   --> $DIR/multiple-types-with-same-name-and-derive.rs:8:8
+    |
+ LL | struct NotSM;
+    |        ^^^^^
+    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+ 
+ error: aborting due to 7 previous errors


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 duplicate/multiple-types-with-same-name-and-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/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/duplicate/multiple-types-with-same-name-and-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/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--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/aarch64-unknown-linux-gnu/test/ui/duplicate/multiple-types-with-same-name-and-derive" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error[E0428]: the name `NotSM` is defined multiple times
##[error]  --> /checkout/tests/ui/duplicate/multiple-types-with-same-name-and-derive.rs:12:1
   |
LL | struct NotSM;
   | ------------- previous definition of the type `NotSM` here
...
LL | struct NotSM<T>(T);
   | ^^^^^^^^^^^^^^^^^^^ `NotSM` redefined here
   |
   = note: `NotSM` must be defined only once in the type namespace of this module

error[E0107]: struct takes 0 generic arguments but 1 generic argument was supplied
##[error]  --> /checkout/tests/ui/duplicate/multiple-types-with-same-name-and-derive.rs:12:8
   |
LL | struct NotSM<T>(T);
   |        ^^^^^ expected 0 generic arguments
   |
note: struct defined here, with 0 generic parameters
  --> /checkout/tests/ui/duplicate/multiple-types-with-same-name-and-derive.rs:8:8
   |
LL | struct NotSM;
---

error[E0107]: struct takes 0 generic arguments but 1 generic argument was supplied
##[error]  --> /checkout/tests/ui/duplicate/multiple-types-with-same-name-and-derive.rs:12:8
   |
LL | struct NotSM<T>(T);
   |        ^^^^^ expected 0 generic arguments
   |
note: struct defined here, with 0 generic parameters
  --> /checkout/tests/ui/duplicate/multiple-types-with-same-name-and-derive.rs:8:8
   |
LL | struct NotSM;
   |        ^^^^^
   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`

error[E0107]: struct takes 0 generic arguments but 1 generic argument was supplied
##[error]  --> /checkout/tests/ui/duplicate/multiple-types-with-same-name-and-derive.rs:12:8
   |
LL | struct NotSM<T>(T);
   |        ^^^^^ expected 0 generic arguments
   |
note: struct defined here, with 0 generic parameters
  --> /checkout/tests/ui/duplicate/multiple-types-with-same-name-and-derive.rs:8:8
   |
LL | struct NotSM;
   |        ^^^^^
   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`

error[E0107]: struct takes 0 generic arguments but 1 generic argument was supplied
##[error]  --> /checkout/tests/ui/duplicate/multiple-types-with-same-name-and-derive.rs:12:8
   |
LL | struct NotSM<T>(T);
   |        ^^^^^ expected 0 generic arguments
   |
note: struct defined here, with 0 generic parameters
  --> /checkout/tests/ui/duplicate/multiple-types-with-same-name-and-derive.rs:8:8
   |
LL | struct NotSM;
   |        ^^^^^
   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`

error[E0609]: no field `0` on type `&NotSM`
##[error]  --> /checkout/tests/ui/duplicate/multiple-types-with-same-name-and-derive.rs:12:17
   |
LL | struct NotSM<T>(T);
   |                 ^ unknown field

error: aborting due to 7 previous errors

Some errors have detailed explanations: E0107, E0428, E0609.
---
21 help: consider introducing lifetime `'b` here
22    |
- LL | struct Test<'b> {
-    |            ++++
+ LL | <'b>#[derive(Eq, PartialEq)]
+    | ++++
25 
26 error[E0261]: use of undeclared lifetime name `'b`
27   --> $DIR/undeclared-lifetime-used-in-debug-macro-issue-70152.rs:13:13


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 lifetimes/undeclared-lifetime-used-in-debug-macro-issue-70152.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/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/lifetimes/undeclared-lifetime-used-in-debug-macro-issue-70152.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/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--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/aarch64-unknown-linux-gnu/test/ui/lifetimes/undeclared-lifetime-used-in-debug-macro-issue-70152" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error[E0261]: use of undeclared lifetime name `'b`
##[error]  --> /checkout/tests/ui/lifetimes/undeclared-lifetime-used-in-debug-macro-issue-70152.rs:3:9
   |
---
   |         ^^ undeclared lifetime
   |
help: consider introducing lifetime `'b` here
   |
LL | <'b>#[derive(Eq, PartialEq)]
   | ++++

error[E0261]: use of undeclared lifetime name `'b`
##[error]  --> /checkout/tests/ui/lifetimes/undeclared-lifetime-used-in-debug-macro-issue-70152.rs:13:13
   |
LL |     fn foo(&'b self) {} //~ ERROR use of undeclared lifetime name `'b`
   |             ^^ undeclared lifetime
   |
help: consider introducing lifetime `'b` here
   |
LL |     fn foo<'b>(&'b self) {} //~ ERROR use of undeclared lifetime name `'b`
   |           ++++
help: consider introducing lifetime `'b` here
   |
LL | impl<'b> T for Test {
   |     ++++

error: aborting due to 3 previous errors

For more information about this error, try `rustc --explain E0261`.
------------------------------------------

---- [ui] tests/ui/lifetimes/undeclared-lifetime-used-in-debug-macro-issue-70152.rs stdout end ----
---- [ui] tests/ui/stats/macro-stats.rs stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/stats/macro-stats/macro-stats.stderr`
diff of stderr:

8 macro-stats q!                                    1         26       26.0        519      519.0
9 macro-stats #[derive(Ord)]                        1         15       15.0        503      503.0
10 macro-stats #[derive(Default)]                    2         16        8.0        403      201.5
- macro-stats #[derive(Eq)]                         1         10       10.0        298      298.0
+ macro-stats #[derive(Eq)]                         1         11       11.0        311      311.0
12 macro-stats #[derive(Debug)]                      1          8        8.0        277      277.0
13 macro-stats #[derive(PartialEq)]                  1          9        9.0        267      267.0
14 macro-stats #[derive(Copy)]                       1          2        2.0         61       61.0


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 stats/macro-stats.rs`

error: 1 errors occurred comparing output.
status: exit status: 0
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/stats/macro-stats.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/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--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/aarch64-unknown-linux-gnu/test/ui/stats/macro-stats" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "-Zmacro-stats"
stdout: none
--- stderr -------------------------------
macro-stats ===================================================================================
macro-stats MACRO EXPANSION STATS: macro_stats
macro-stats Macro Name                         Uses      Lines  Avg Lines      Bytes  Avg Bytes
macro-stats -----------------------------------------------------------------------------------
macro-stats #[derive(Clone)]                      8         67        8.4      1_879      234.9
macro-stats #[derive(PartialOrd)]                 1         17       17.0        675      675.0
macro-stats #[derive(Hash)]                       2         17        8.5        565      282.5
macro-stats q!                                    1         26       26.0        519      519.0
macro-stats #[derive(Ord)]                        1         15       15.0        503      503.0
macro-stats #[derive(Default)]                    2         16        8.0        403      201.5
macro-stats #[derive(Eq)]                         1         11       11.0        311      311.0
macro-stats #[derive(Debug)]                      1          8        8.0        277      277.0
macro-stats #[derive(PartialEq)]                  1          9        9.0        267      267.0
macro-stats #[derive(Copy)]                       1          2        2.0         61       61.0
macro-stats p!                                    1          3        3.0         32       32.0
macro-stats trait_impl_tys!                       1          2        2.0         28       28.0
macro-stats foreign_item!                         1          1        1.0         21       21.0
macro-stats long_name_that_doesnt_fit_on_one_line!
macro-stats                                       1          1        1.0         18       18.0
macro-stats impl_const!                           1          1        1.0         17       17.0
macro-stats trait_tys!                            1          2        2.0         15       15.0
macro-stats n99!                                  2          2        1.0          4        2.0
macro-stats none!                                 1          1        1.0          4        4.0
macro-stats u32!                                  1          1        1.0          3        3.0
macro-stats long_name_that_fits_on_one_line!     10         10        1.0          0        0.0
macro-stats long_name_that_fits_on_one_line_____! 1          1        1.0          0        0.0
macro-stats long_name_that_fits_on_one_line____!  1          1        1.0          0        0.0
macro-stats long_name_that_fits_on_one_line___!   1          1        1.0          0        0.0
macro-stats long_name_that_fits_on_one_line__!    1          1        1.0          0        0.0
macro-stats long_name_that_fits_on_one_line_!     1          1        1.0          0        0.0
macro-stats #[test]                               1          1        1.0          0        0.0
macro-stats ===================================================================================
------------------------------------------

---- [ui] tests/ui/stats/macro-stats.rs stdout end ----
---- [ui] tests/ui/symbol-names/const-generics-structural-demangling.rs stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/symbol-names/const-generics-structural-demangling/const-generics-structural-demangling.stderr`
diff of stderr:

124 LL | #[rustc_symbol_name]
125    | ^^^^^^^^^^^^^^^^^^^^
126 
- error: symbol-name(_RMsd_CsCRATE_HASH_1cINtB<REF>_4Bar_KVNtB<REF>_3BarS1xh7b_s_1xt1000_EE)
+ error: symbol-name(_RMsf_CsCRATE_HASH_1cINtB<REF>_4Bar_KVNtB<REF>_3BarS1xh7b_s_1xt1000_EE)
128   --> $DIR/const-generics-structural-demangling.rs:93:5
129    |
130 LL |     #[rustc_symbol_name]

Note: some mismatched output was normalized before being compared
- error: symbol-name(_RMsf_Cs6IRxgSShgKb_1cINtB3_4Bar_KVNtB3_3BarS1xh7b_s_1xt1000_EE)
-   --> /checkout/tests/ui/symbol-names/const-generics-structural-demangling.rs:93:5
+ error: symbol-name(_RMsf_CsCRATE_HASH_1cINtB<REF>_4Bar_KVNtB<REF>_3BarS1xh7b_s_1xt1000_EE)


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 symbol-names/const-generics-structural-demangling.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/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/symbol-names/const-generics-structural-demangling.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/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--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" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/symbol-names/const-generics-structural-demangling" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "-C" "symbol-mangling-version=v0" "--crate-name=c"
stdout: none
--- stderr -------------------------------
error: symbol-name(_RMCs6IRxgSShgKb_1cINtB0_7RefByteKRh7b_E)
##[error]  --> /checkout/tests/ui/symbol-names/const-generics-structural-demangling.rs:13:1
   |
LL | #[rustc_symbol_name]
   | ^^^^^^^^^^^^^^^^^^^^

error: demangling(<c[4e5061322b75ab09]::RefByte<{&123u8}>>)
##[error]  --> /checkout/tests/ui/symbol-names/const-generics-structural-demangling.rs:13:1
   |
LL | #[rustc_symbol_name]
   | ^^^^^^^^^^^^^^^^^^^^

error: demangling-alt(<c::RefByte<{&123}>>)
##[error]  --> /checkout/tests/ui/symbol-names/const-generics-structural-demangling.rs:13:1
   |
LL | #[rustc_symbol_name]
   | ^^^^^^^^^^^^^^^^^^^^

error: symbol-name(_RMs_Cs6IRxgSShgKb_1cINtB2_6RefZstKRAEE)
##[error]  --> /checkout/tests/ui/symbol-names/const-generics-structural-demangling.rs:23:1
   |
LL | #[rustc_symbol_name]
   | ^^^^^^^^^^^^^^^^^^^^

error: demangling(<c[4e5061322b75ab09]::RefZst<{&[]}>>)
##[error]  --> /checkout/tests/ui/symbol-names/const-generics-structural-demangling.rs:23:1
   |
LL | #[rustc_symbol_name]
   | ^^^^^^^^^^^^^^^^^^^^

error: demangling-alt(<c::RefZst<{&[]}>>)
##[error]  --> /checkout/tests/ui/symbol-names/const-generics-structural-demangling.rs:23:1
   |
LL | #[rustc_symbol_name]
   | ^^^^^^^^^^^^^^^^^^^^

error: symbol-name(_RMs0_Cs6IRxgSShgKb_1cINtB3_11Array3BytesKAh1_h2_h3_EE)
##[error]  --> /checkout/tests/ui/symbol-names/const-generics-structural-demangling.rs:31:1
   |
LL | #[rustc_symbol_name]
   | ^^^^^^^^^^^^^^^^^^^^

error: demangling(<c[4e5061322b75ab09]::Array3Bytes<{[1u8, 2u8, 3u8]}>>)
##[error]  --> /checkout/tests/ui/symbol-names/const-generics-structural-demangling.rs:31:1
   |
LL | #[rustc_symbol_name]
   | ^^^^^^^^^^^^^^^^^^^^

error: demangling-alt(<c::Array3Bytes<{[1, 2, 3]}>>)
##[error]  --> /checkout/tests/ui/symbol-names/const-generics-structural-demangling.rs:31:1
   |
LL | #[rustc_symbol_name]
   | ^^^^^^^^^^^^^^^^^^^^

error: symbol-name(_RMs1_Cs6IRxgSShgKb_1cINtB3_13TupleByteBoolKTh1_b0_EE)
##[error]  --> /checkout/tests/ui/symbol-names/const-generics-structural-demangling.rs:39:1
   |
LL | #[rustc_symbol_name]
   | ^^^^^^^^^^^^^^^^^^^^

error: demangling(<c[4e5061322b75ab09]::TupleByteBool<{(1u8, false)}>>)
##[error]  --> /checkout/tests/ui/symbol-names/const-generics-structural-demangling.rs:39:1
   |
LL | #[rustc_symbol_name]
   | ^^^^^^^^^^^^^^^^^^^^

error: demangling-alt(<c::TupleByteBool<{(1, false)}>>)
##[error]  --> /checkout/tests/ui/symbol-names/const-generics-structural-demangling.rs:39:1
   |
LL | #[rustc_symbol_name]
   | ^^^^^^^^^^^^^^^^^^^^

error: symbol-name(_RMs2_Cs6IRxgSShgKb_1cINtB3_11OptionUsizeKVNtINtB3_8MyOptionjE4NoneUE)
##[error]  --> /checkout/tests/ui/symbol-names/const-generics-structural-demangling.rs:55:1
   |
LL | #[rustc_symbol_name]
   | ^^^^^^^^^^^^^^^^^^^^

error: demangling(<c[4e5061322b75ab09]::OptionUsize<{c[4e5061322b75ab09]::MyOption::<usize>::None}>>)
##[error]  --> /checkout/tests/ui/symbol-names/const-generics-structural-demangling.rs:55:1
   |
LL | #[rustc_symbol_name]
   | ^^^^^^^^^^^^^^^^^^^^

error: demangling-alt(<c::OptionUsize<{c::MyOption::<usize>::None}>>)
##[error]  --> /checkout/tests/ui/symbol-names/const-generics-structural-demangling.rs:55:1
   |
LL | #[rustc_symbol_name]
   | ^^^^^^^^^^^^^^^^^^^^

error: symbol-name(_RMs3_Cs6IRxgSShgKb_1cINtB3_11OptionUsizeKVNtINtB3_8MyOptionjE4SomeTj0_EE)
##[error]  --> /checkout/tests/ui/symbol-names/const-generics-structural-demangling.rs:63:1
   |
LL | #[rustc_symbol_name]
   | ^^^^^^^^^^^^^^^^^^^^

error: demangling(<c[4e5061322b75ab09]::OptionUsize<{c[4e5061322b75ab09]::MyOption::<usize>::Some(0usize)}>>)
##[error]  --> /checkout/tests/ui/symbol-names/const-generics-structural-demangling.rs:63:1
   |
LL | #[rustc_symbol_name]
   | ^^^^^^^^^^^^^^^^^^^^

error: demangling-alt(<c::OptionUsize<{c::MyOption::<usize>::Some(0)}>>)
##[error]  --> /checkout/tests/ui/symbol-names/const-generics-structural-demangling.rs:63:1
   |
LL | #[rustc_symbol_name]
   | ^^^^^^^^^^^^^^^^^^^^

error: symbol-name(_RMs4_Cs6IRxgSShgKb_1cINtB3_4Foo_KVNtB3_3FooS1sRe616263_2chc78_5sliceRAh1_h2_h3_EEE)
##[error]  --> /checkout/tests/ui/symbol-names/const-generics-structural-demangling.rs:77:1
   |
LL | #[rustc_symbol_name]
   | ^^^^^^^^^^^^^^^^^^^^

error: demangling(<c[4e5061322b75ab09]::Foo_<{c[4e5061322b75ab09]::Foo { s: "abc", ch: 'x', slice: &[1u8, 2u8, 3u8] }}>>)
##[error]  --> /checkout/tests/ui/symbol-names/const-generics-structural-demangling.rs:77:1
   |
LL | #[rustc_symbol_name]
   | ^^^^^^^^^^^^^^^^^^^^

error: demangling-alt(<c::Foo_<{c::Foo { s: "abc", ch: 'x', slice: &[1, 2, 3] }}>>)
##[error]  --> /checkout/tests/ui/symbol-names/const-generics-structural-demangling.rs:77:1
   |
LL | #[rustc_symbol_name]
   | ^^^^^^^^^^^^^^^^^^^^

error: symbol-name(_RMsf_Cs6IRxgSShgKb_1cINtB3_4Bar_KVNtB3_3BarS1xh7b_s_1xt1000_EE)
##[error]  --> /checkout/tests/ui/symbol-names/const-generics-structural-demangling.rs:93:5
   |
LL |     #[rustc_symbol_name]
   |     ^^^^^^^^^^^^^^^^^^^^
...
LL | duplicate_field_name_test!(x);
   | ----------------------------- in this macro invocation
   |
   = note: this error originates in the macro `duplicate_field_name_test` (in Nightly builds, run with -Z macro-backtrace for more info)

error: demangling(<c[4e5061322b75ab09]::Bar_<{c[4e5061322b75ab09]::Bar { x: 123u8, x: 4096u16 }}>>)
##[error]  --> /checkout/tests/ui/symbol-names/const-generics-structural-demangling.rs:93:5
   |
LL |     #[rustc_symbol_name]
   |     ^^^^^^^^^^^^^^^^^^^^
...
LL | duplicate_field_name_test!(x);
   | ----------------------------- in this macro invocation
   |
   = note: this error originates in the macro `duplicate_field_name_test` (in Nightly builds, run with -Z macro-backtrace for more info)

error: demangling-alt(<c::Bar_<{c::Bar { x: 123, x: 4096 }}>>)
##[error]  --> /checkout/tests/ui/symbol-names/const-generics-structural-demangling.rs:93:5
   |
LL |     #[rustc_symbol_name]
   |     ^^^^^^^^^^^^^^^^^^^^
...

</details>

KiChjang KiChjang commented on code on Feb 26, 2026 17:34 UTC
Code Review
tests/ui/duplicate/multiple-types-with-same-name-and-derive.rs:1
@@ -13,6 +13,7 @@ struct NotSM<T>(T);
 //~^ ERROR: struct takes 0 generic arguments
 //~| ERROR: struct takes 0 generic arguments
 //~| ERROR: struct takes 0 generic arguments
+//~| ERROR: struct takes 0 generic arguments

This is expected since the Eq derive macro now respans generics in the where clause, which causes the same E0107 error to be reported in 2 different contexts instead of simply the original one (i.e. in the derived trait impl for Eq)

rust-log-analyzer rust-log-analyzer commented on Feb 26, 2026 18:06 UTC
Contributor

The job aarch64-gnu-llvm-20-1 failed! Check out the build log: (web) (plain enhanced) (plain)

<details><summary><i>Click to see the possible cause of the failure (guessed by this bot)</i></summary>

##[group]Runner Image Provisioner
Hosted Compute Agent
Version: 20260123.484
Commit: 6bd6555ca37d84114959e1c76d2c01448ff61c5d
Build Date: 2026-01-23T19:41:17Z
Worker ID: {4015ac4f-a280-4f51-8401-889c34e9f2ed}
Azure Region: southcentralus
##[endgroup]
##[group]VM Image
- OS: Linux (arm64)
- Source: Partner
- Name: Ubuntu 24.04 by Arm Limited
---
/dev/sda15       98M  6.4M   92M   7% /boot/efi
tmpfs           1.6G   16K  1.6G   1% /run/user/1001
================================================================================

Sufficient disk space available (120900848KB >= 52428800KB). Skipping cleanup.
##[group]Run echo "[CI_PR_NUMBER=$num]"
echo "[CI_PR_NUMBER=$num]"
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
---
set -ex

# Run a subset of tests. Used to run tests in parallel in multiple jobs.

# When this job partition is run as part of PR CI, skip tidy to allow revealing more failures. The
# dedicated `tidy` job failing won't block other PR CI jobs from completing, and so tidy failures
# shouldn't inhibit revealing other failures in PR CI jobs.
if [ "$PR_CI_JOB" == "1" ]; then
  echo "PR_CI_JOB set; skipping tidy"
  SKIP_TIDY="--skip tidy"
fi

../x.py --stage 2 test \
  ${SKIP_TIDY:+$SKIP_TIDY} \
  --skip compiler \
  --skip src
#!/bin/bash

set -ex

# Run a subset of tests. Used to run tests in parallel in multiple jobs.

# When this job partition is run as part of PR CI, skip tidy to allow revealing more failures. The
# dedicated `tidy` job failing won't block other PR CI jobs from completing, and so tidy failures
# shouldn't inhibit revealing other failures in PR CI jobs.
if [ "$PR_CI_JOB" == "1" ]; then
  echo "PR_CI_JOB set; skipping tidy"
  SKIP_TIDY="--skip tidy"
fi

../x.py --stage 2 test \
  ${SKIP_TIDY:+$SKIP_TIDY} \
  --skip tests \
  --skip coverage-map \
  --skip coverage-run \
  --skip library \
  --skip tidyselftest
---
##[endgroup]
Executing "/scripts/stage_2_test_set1.sh"
+ /scripts/stage_2_test_set1.sh
+ '[' 1 == 1 ']'
+ echo 'PR_CI_JOB set; skipping tidy'
PR_CI_JOB set; skipping tidy
+ SKIP_TIDY='--skip tidy'
+ ../x.py --stage 2 test --skip tidy --skip compiler --skip src
##[group]Building bootstrap
    Finished `dev` profile [unoptimized] target(s) in 0.04s
##[endgroup]
downloading https://static.rust-lang.org/dist/2026-01-21/rustfmt-nightly-aarch64-unknown-linux-gnu.tar.xz
---
test [ui] tests/ui/abi/abi-sysv64-register-usage.rs ... ignored, ignored when the architecture is aarch64
test [ui] tests/ui/abi/abi-typo-unstable.rs#feature_disabled ... ok
test [ui] tests/ui/abi/abi-typo-unstable.rs#feature_enabled ... ok
test [ui] tests/ui/abi/anon-extern-mod.rs ... ok
test [ui] tests/ui/abi/avr-sram.rs#disable_sram ... ok
test [ui] tests/ui/abi/avr-sram.rs#has_sram ... ok
test [ui] tests/ui/abi/arm-unadjusted-intrinsic.rs#aarch64 ... ok
test [ui] tests/ui/abi/avr-sram.rs#no_sram ... ok
test [ui] tests/ui/abi/arm-unadjusted-intrinsic.rs#arm ... ok
test [ui] tests/ui/abi/bad-custom.rs ... ok
test [ui] tests/ui/abi/c-stack-as-value.rs ... ok
test [ui] tests/ui/abi/c-zst.rs#aarch64-darwin ... ok
test [ui] tests/ui/abi/c-zst.rs#powerpc-linux ... ok
---
test [ui] tests/ui/asm/aarch64/type-check-2.rs ... ok
test [ui] tests/ui/asm/aarch64/type-check-3.rs ... ok
test [ui] tests/ui/asm/aarch64/type-f16.rs ... ok
test [ui] tests/ui/asm/aarch64/sym.rs ... ok
test [ui] tests/ui/asm/aarch64v8r.rs#hf ... ok
test [ui] tests/ui/asm/aarch64v8r.rs#r82 ... ok
test [ui] tests/ui/asm/arm-low-dreg.rs ... ok
test [ui] tests/ui/asm/aarch64v8r.rs#sf ... ok
test [ui] tests/ui/asm/binary_asm_labels.rs ... ignored, only executed when the architecture is x86_64
test [ui] tests/ui/asm/asm-with-nested-closure.rs ... ok
test [ui] tests/ui/asm/cfg-parse-error.rs ... ok
test [ui] tests/ui/asm/cfg.rs#reva ... ignored, only executed when the architecture is x86_64
test [ui] tests/ui/asm/cfg.rs#revb ... ignored, only executed when the architecture is x86_64
---
test [ui] tests/ui/const-generics/ogca/basic.rs ... ok
test [ui] tests/ui/const-generics/ogca/basic-fail.rs ... ok
test [ui] tests/ui/const-generics/occurs-check/unused-substs-4.rs ... ok
test [ui] tests/ui/const-generics/occurs-check/unused-substs-5.rs ... ok
test [ui] tests/ui/const-generics/ogca/coherence-ambiguous.rs ... ok
test [ui] tests/ui/const-generics/ogca/rhs-but-not-root.rs ... ok
test [ui] tests/ui/const-generics/ogca/generic-param-rhs.rs ... ok
test [ui] tests/ui/const-generics/opaque_types.rs ... ok
test [ui] tests/ui/const-generics/outer-lifetime-in-const-generic-default.rs ... ok
test [ui] tests/ui/const-generics/opaque_types2.rs ... ok
test [ui] tests/ui/const-generics/overlapping_impls.rs ... ok
test [ui] tests/ui/const-generics/params-in-ct-in-ty-param-lazy-norm.rs#full ... ok
---
test [ui] tests/ui/extern/issue-64655-extern-rust-must-allow-unwind.rs#fat2 ... ok
test [ui] tests/ui/extern/issue-64655-extern-rust-must-allow-unwind.rs#fat3 ... ok
test [ui] tests/ui/extern/issue-80074.rs ... ok
test [ui] tests/ui/extern/issue-95829.rs ... ok
test [ui] tests/ui/extern/lgamma-linkage.rs ... ok
test [ui] tests/ui/extern/no-mangle-associated-fn.rs ... ok
test [ui] tests/ui/extern/not-in-block.rs ... ok
test [ui] tests/ui/extern/unsized-extern-derefmove.rs ... ok
test [ui] tests/ui/extern/windows-tcb-trash-13259.rs ... ok
test [ui] tests/ui/feature-gates/allow-features-empty.rs ... ok
---
test [ui] tests/ui/feature-gates/feature-gate-macro-derive.rs ... ok
test [ui] tests/ui/feature-gates/feature-gate-macro-metavar-expr-concat.rs ... ok
test [ui] tests/ui/feature-gates/feature-gate-marker_trait_attr.rs ... ok
test [ui] tests/ui/feature-gates/feature-gate-may-dangle.rs ... ok
test [ui] tests/ui/feature-gates/feature-gate-mgca-type-const-syntax.rs ... ok
test [ui] tests/ui/feature-gates/feature-gate-min-generic-const-args.rs ... ok
test [ui] tests/ui/feature-gates/feature-gate-min_const_fn.rs ... ok
test [ui] tests/ui/feature-gates/feature-gate-movrs_target_feature.rs ... ignored, only executed when the architecture is x86_64
test [ui] tests/ui/feature-gates/feature-gate-more-qualified-paths.rs ... ok
test [ui] tests/ui/feature-gates/feature-gate-more-maybe-bounds.rs ... ok
---
test [ui] tests/ui/imports/ambiguous-7.rs ... ok
test [ui] tests/ui/imports/ambiguous-import-visibility-module.rs ... ok
test [ui] tests/ui/imports/ambiguous-8.rs ... ok
test [ui] tests/ui/imports/ambiguous-glob-vs-expanded-extern.rs ... ok
test [ui] tests/ui/imports/ambiguous-panic-glob-vs-multiouter.rs ... ok
test [ui] tests/ui/imports/ambiguous-panic-globvsglob.rs ... ok
test [ui] tests/ui/imports/ambiguous-panic-no-implicit-prelude.rs ... ok
test [ui] tests/ui/imports/ambiguous-panic-non-prelude-core-glob.rs ... ok
test [ui] tests/ui/imports/ambiguous-panic-non-prelude-std-glob.rs ... ok
test [ui] tests/ui/imports/ambiguous-panic-pick-core.rs ... ok
test [ui] tests/ui/imports/ambiguous-panic-pick-std.rs ... ok
---
test [ui] tests/ui/layout/post-mono-layout-cycle.rs ... ok
test [ui] tests/ui/layout/randomize.rs#randomize-layout ... ok
test [ui] tests/ui/layout/randomize.rs#normal ... ok
test [ui] tests/ui/layout/null-pointer-optimization.rs ... ok
test [ui] tests/ui/layout/rigid-alias-due-to-broken-impl.rs ... ok
test [ui] tests/ui/layout/size-of-val-raw-too-big.rs ... ignored, only executed when the pointer width is 32bit (Layout computation rejects this layout for different reasons on 64-bit.)
test [ui] tests/ui/layout/reprc-power-alignment.rs ... ok
test [ui] tests/ui/layout/struct.rs ... ok
test [ui] tests/ui/layout/rigid-alias-no-params.rs ... ok
test [ui] tests/ui/layout/thaw-validate-invalid-enum.rs ... ok
---
21 help: consider introducing lifetime `'b` here
22    |
- LL | struct Test<'b> {
-    |            ++++
+ LL | <'b>#[derive(Eq, PartialEq)]
+    | ++++
25 
26 error[E0261]: use of undeclared lifetime name `'b`
27   --> $DIR/undeclared-lifetime-used-in-debug-macro-issue-70152.rs:13:13


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 lifetimes/undeclared-lifetime-used-in-debug-macro-issue-70152.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/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/lifetimes/undeclared-lifetime-used-in-debug-macro-issue-70152.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/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--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/aarch64-unknown-linux-gnu/test/ui/lifetimes/undeclared-lifetime-used-in-debug-macro-issue-70152" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error[E0261]: use of undeclared lifetime name `'b`
##[error]  --> /checkout/tests/ui/lifetimes/undeclared-lifetime-used-in-debug-macro-issue-70152.rs:3:9
   |
---
   |         ^^ undeclared lifetime
   |
help: consider introducing lifetime `'b` here
   |
LL | <'b>#[derive(Eq, PartialEq)]
   | ++++

error[E0261]: use of undeclared lifetime name `'b`
##[error]  --> /checkout/tests/ui/lifetimes/undeclared-lifetime-used-in-debug-macro-issue-70152.rs:13:13
   |
LL |     fn foo(&'b self) {} //~ ERROR use of undeclared lifetime name `'b`
   |             ^^ undeclared lifetime
   |
help: consider introducing lifetime `'b` here
   |
LL |     fn foo<'b>(&'b self) {} //~ ERROR use of undeclared lifetime name `'b`
   |           ++++
help: consider introducing lifetime `'b` here
   |
LL | impl<'b> T for Test {
   |     ++++

error: aborting due to 3 previous errors

For more information about this error, try `rustc --explain E0261`.
------------------------------------------

---- [ui] tests/ui/lifetimes/undeclared-lifetime-used-in-debug-macro-issue-70152.rs stdout end ----
---- [ui] tests/ui/stats/macro-stats.rs stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/stats/macro-stats/macro-stats.stderr`
diff of stderr:

8 macro-stats q!                                    1         26       26.0        519      519.0
9 macro-stats #[derive(Ord)]                        1         15       15.0        503      503.0
10 macro-stats #[derive(Default)]                    2         16        8.0        403      201.5
- macro-stats #[derive(Eq)]                         1         10       10.0        298      298.0
+ macro-stats #[derive(Eq)]                         1         11       11.0        311      311.0
12 macro-stats #[derive(Debug)]                      1          8        8.0        277      277.0
13 macro-stats #[derive(PartialEq)]                  1          9        9.0        267      267.0
14 macro-stats #[derive(Copy)]                       1          2        2.0         61       61.0


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 stats/macro-stats.rs`

error: 1 errors occurred comparing output.
status: exit status: 0
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/stats/macro-stats.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/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--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/aarch64-unknown-linux-gnu/test/ui/stats/macro-stats" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "-Zmacro-stats"
stdout: none
--- stderr -------------------------------
macro-stats ===================================================================================
macro-stats MACRO EXPANSION STATS: macro_stats
macro-stats Macro Name                         Uses      Lines  Avg Lines      Bytes  Avg Bytes
macro-stats -----------------------------------------------------------------------------------
macro-stats #[derive(Clone)]                      8         67        8.4      1_879      234.9
macro-stats #[derive(PartialOrd)]                 1         17       17.0        675      675.0
macro-stats #[derive(Hash)]                       2         17        8.5        565      282.5
macro-stats q!                                    1         26       26.0        519      519.0
macro-stats #[derive(Ord)]                        1         15       15.0        503      503.0
macro-stats #[derive(Default)]                    2         16        8.0        403      201.5
macro-stats #[derive(Eq)]                         1         11       11.0        311      311.0
macro-stats #[derive(Debug)]                      1          8        8.0        277      277.0
macro-stats #[derive(PartialEq)]                  1          9        9.0        267      267.0
macro-stats #[derive(Copy)]                       1          2        2.0         61       61.0
macro-stats p!                                    1          3        3.0         32       32.0
macro-stats trait_impl_tys!                       1          2        2.0         28       28.0
macro-stats foreign_item!                         1          1        1.0         21       21.0
macro-stats long_name_that_doesnt_fit_on_one_line!
macro-stats                                       1          1        1.0         18       18.0
macro-stats impl_const!                           1          1        1.0         17       17.0
macro-stats trait_tys!                            1          2        2.0         15       15.0
macro-stats n99!                                  2          2        1.0          4        2.0
macro-stats none!                                 1          1        1.0          4        4.0
macro-stats u32!                                  1          1        1.0          3        3.0
macro-stats long_name_that_fits_on_one_line!     10         10        1.0          0        0.0
macro-stats long_name_that_fits_on_one_line_____! 1          1        1.0          0        0.0
macro-stats long_name_that_fits_on_one_line____!  1          1        1.0          0        0.0
macro-stats long_name_that_fits_on_one_line___!   1          1        1.0          0        0.0
macro-stats long_name_that_fits_on_one_line__!    1          1        1.0          0        0.0
macro-stats long_name_that_fits_on_one_line_!     1          1        1.0          0        0.0
macro-stats #[test]                               1          1        1.0          0        0.0
macro-stats ===================================================================================
------------------------------------------

---- [ui] tests/ui/stats/macro-stats.rs stdout end ----
---- [ui] tests/ui/symbol-names/const-generics-structural-demangling.rs stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/symbol-names/const-generics-structural-demangling/const-generics-structural-demangling.stderr`
diff of stderr:

124 LL | #[rustc_symbol_name]
125    | ^^^^^^^^^^^^^^^^^^^^
126 
- error: symbol-name(_RMsd_CsCRATE_HASH_1cINtB<REF>_4Bar_KVNtB<REF>_3BarS1xh7b_s_1xt1000_EE)
+ error: symbol-name(_RMsf_CsCRATE_HASH_1cINtB<REF>_4Bar_KVNtB<REF>_3BarS1xh7b_s_1xt1000_EE)
128   --> $DIR/const-generics-structural-demangling.rs:93:5
129    |
130 LL |     #[rustc_symbol_name]

Note: some mismatched output was normalized before being compared
- error: symbol-name(_RMsf_Cs6IRxgSShgKb_1cINtB3_4Bar_KVNtB3_3BarS1xh7b_s_1xt1000_EE)
-   --> /checkout/tests/ui/symbol-names/const-generics-structural-demangling.rs:93:5
+ error: symbol-name(_RMsf_CsCRATE_HASH_1cINtB<REF>_4Bar_KVNtB<REF>_3BarS1xh7b_s_1xt1000_EE)


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 symbol-names/const-generics-structural-demangling.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/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/symbol-names/const-generics-structural-demangling.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/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--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" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/symbol-names/const-generics-structural-demangling" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "-C" "symbol-mangling-version=v0" "--crate-name=c"
stdout: none
--- stderr -------------------------------
error: symbol-name(_RMCs6IRxgSShgKb_1cINtB0_7RefByteKRh7b_E)
##[error]  --> /checkout/tests/ui/symbol-names/const-generics-structural-demangling.rs:13:1
   |
LL | #[rustc_symbol_name]
   | ^^^^^^^^^^^^^^^^^^^^

error: demangling(<c[4e5061322b75ab09]::RefByte<{&123u8}>>)
##[error]  --> /checkout/tests/ui/symbol-names/const-generics-structural-demangling.rs:13:1
   |
LL | #[rustc_symbol_name]
   | ^^^^^^^^^^^^^^^^^^^^

error: demangling-alt(<c::RefByte<{&123}>>)
##[error]  --> /checkout/tests/ui/symbol-names/const-generics-structural-demangling.rs:13:1
   |
LL | #[rustc_symbol_name]
   | ^^^^^^^^^^^^^^^^^^^^

error: symbol-name(_RMs_Cs6IRxgSShgKb_1cINtB2_6RefZstKRAEE)
##[error]  --> /checkout/tests/ui/symbol-names/const-generics-structural-demangling.rs:23:1
   |
LL | #[rustc_symbol_name]
   | ^^^^^^^^^^^^^^^^^^^^

error: demangling(<c[4e5061322b75ab09]::RefZst<{&[]}>>)
##[error]  --> /checkout/tests/ui/symbol-names/const-generics-structural-demangling.rs:23:1
   |
LL | #[rustc_symbol_name]
   | ^^^^^^^^^^^^^^^^^^^^

error: demangling-alt(<c::RefZst<{&[]}>>)
##[error]  --> /checkout/tests/ui/symbol-names/const-generics-structural-demangling.rs:23:1
   |
LL | #[rustc_symbol_name]
   | ^^^^^^^^^^^^^^^^^^^^

error: symbol-name(_RMs0_Cs6IRxgSShgKb_1cINtB3_11Array3BytesKAh1_h2_h3_EE)
##[error]  --> /checkout/tests/ui/symbol-names/const-generics-structural-demangling.rs:31:1
   |
LL | #[rustc_symbol_name]
   | ^^^^^^^^^^^^^^^^^^^^

error: demangling(<c[4e5061322b75ab09]::Array3Bytes<{[1u8, 2u8, 3u8]}>>)
##[error]  --> /checkout/tests/ui/symbol-names/const-generics-structural-demangling.rs:31:1
   |
LL | #[rustc_symbol_name]
   | ^^^^^^^^^^^^^^^^^^^^

error: demangling-alt(<c::Array3Bytes<{[1, 2, 3]}>>)
##[error]  --> /checkout/tests/ui/symbol-names/const-generics-structural-demangling.rs:31:1
   |
LL | #[rustc_symbol_name]
   | ^^^^^^^^^^^^^^^^^^^^

error: symbol-name(_RMs1_Cs6IRxgSShgKb_1cINtB3_13TupleByteBoolKTh1_b0_EE)
##[error]  --> /checkout/tests/ui/symbol-names/const-generics-structural-demangling.rs:39:1
   |
LL | #[rustc_symbol_name]
   | ^^^^^^^^^^^^^^^^^^^^

error: demangling(<c[4e5061322b75ab09]::TupleByteBool<{(1u8, false)}>>)
##[error]  --> /checkout/tests/ui/symbol-names/const-generics-structural-demangling.rs:39:1
   |
LL | #[rustc_symbol_name]
   | ^^^^^^^^^^^^^^^^^^^^

error: demangling-alt(<c::TupleByteBool<{(1, false)}>>)
##[error]  --> /checkout/tests/ui/symbol-names/const-generics-structural-demangling.rs:39:1
   |
LL | #[rustc_symbol_name]
   | ^^^^^^^^^^^^^^^^^^^^

error: symbol-name(_RMs2_Cs6IRxgSShgKb_1cINtB3_11OptionUsizeKVNtINtB3_8MyOptionjE4NoneUE)
##[error]  --> /checkout/tests/ui/symbol-names/const-generics-structural-demangling.rs:55:1
   |
LL | #[rustc_symbol_name]
   | ^^^^^^^^^^^^^^^^^^^^

error: demangling(<c[4e5061322b75ab09]::OptionUsize<{c[4e5061322b75ab09]::MyOption::<usize>::None}>>)
##[error]  --> /checkout/tests/ui/symbol-names/const-generics-structural-demangling.rs:55:1
   |
LL | #[rustc_symbol_name]
   | ^^^^^^^^^^^^^^^^^^^^

error: demangling-alt(<c::OptionUsize<{c::MyOption::<usize>::None}>>)
##[error]  --> /checkout/tests/ui/symbol-names/const-generics-structural-demangling.rs:55:1
   |
LL | #[rustc_symbol_name]
   | ^^^^^^^^^^^^^^^^^^^^

error: symbol-name(_RMs3_Cs6IRxgSShgKb_1cINtB3_11OptionUsizeKVNtINtB3_8MyOptionjE4SomeTj0_EE)
##[error]  --> /checkout/tests/ui/symbol-names/const-generics-structural-demangling.rs:63:1
   |
LL | #[rustc_symbol_name]
   | ^^^^^^^^^^^^^^^^^^^^

error: demangling(<c[4e5061322b75ab09]::OptionUsize<{c[4e5061322b75ab09]::MyOption::<usize>::Some(0usize)}>>)
##[error]  --> /checkout/tests/ui/symbol-names/const-generics-structural-demangling.rs:63:1
   |
LL | #[rustc_symbol_name]
   | ^^^^^^^^^^^^^^^^^^^^

error: demangling-alt(<c::OptionUsize<{c::MyOption::<usize>::Some(0)}>>)
##[error]  --> /checkout/tests/ui/symbol-names/const-generics-structural-demangling.rs:63:1
   |
LL | #[rustc_symbol_name]
   | ^^^^^^^^^^^^^^^^^^^^

error: symbol-name(_RMs4_Cs6IRxgSShgKb_1cINtB3_4Foo_KVNtB3_3FooS1sRe616263_2chc78_5sliceRAh1_h2_h3_EEE)
##[error]  --> /checkout/tests/ui/symbol-names/const-generics-structural-demangling.rs:77:1
   |
LL | #[rustc_symbol_name]
   | ^^^^^^^^^^^^^^^^^^^^

error: demangling(<c[4e5061322b75ab09]::Foo_<{c[4e5061322b75ab09]::Foo { s: "abc", ch: 'x', slice: &[1u8, 2u8, 3u8] }}>>)
##[error]  --> /checkout/tests/ui/symbol-names/const-generics-structural-demangling.rs:77:1
   |
LL | #[rustc_symbol_name]
   | ^^^^^^^^^^^^^^^^^^^^

error: demangling-alt(<c::Foo_<{c::Foo { s: "abc", ch: 'x', slice: &[1, 2, 3] }}>>)
##[error]  --> /checkout/tests/ui/symbol-names/const-generics-structural-demangling.rs:77:1
   |
LL | #[rustc_symbol_name]
   | ^^^^^^^^^^^^^^^^^^^^

error: symbol-name(_RMsf_Cs6IRxgSShgKb_1cINtB3_4Bar_KVNtB3_3BarS1xh7b_s_1xt1000_EE)
##[error]  --> /checkout/tests/ui/symbol-names/const-generics-structural-demangling.rs:93:5
   |
LL |     #[rustc_symbol_name]
   |     ^^^^^^^^^^^^^^^^^^^^
...
LL | duplicate_field_name_test!(x);
   | ----------------------------- in this macro invocation
   |
   = note: this error originates in the macro `duplicate_field_name_test` (in Nightly builds, run with -Z macro-backtrace for more info)

error: demangling(<c[4e5061322b75ab09]::Bar_<{c[4e5061322b75ab09]::Bar { x: 123u8, x: 4096u16 }}>>)
##[error]  --> /checkout/tests/ui/symbol-names/const-generics-structural-demangling.rs:93:5
   |
LL |     #[rustc_symbol_name]
   |     ^^^^^^^^^^^^^^^^^^^^
...
LL | duplicate_field_name_test!(x);
   | ----------------------------- in this macro invocation
   |
   = note: this error originates in the macro `duplicate_field_name_test` (in Nightly builds, run with -Z macro-backtrace for more info)

error: demangling-alt(<c::Bar_<{c::Bar { x: 123, x: 4096 }}>>)
##[error]  --> /checkout/tests/ui/symbol-names/const-generics-structural-demangling.rs:93:5
   |
LL |     #[rustc_symbol_name]
   |     ^^^^^^^^^^^^^^^^^^^^
...

</details>

rust-log-analyzer rust-log-analyzer commented on Feb 27, 2026 20:09 UTC
Contributor

The job aarch64-gnu-llvm-20-1 failed! Check out the build log: (web) (plain enhanced) (plain)

<details><summary><i>Click to see the possible cause of the failure (guessed by this bot)</i></summary>

/dev/sda15       98M  6.4M   92M   7% /boot/efi
tmpfs           1.6G   16K  1.6G   1% /run/user/1001
================================================================================

Sufficient disk space available (120307540KB >= 52428800KB). Skipping cleanup.
##[group]Run echo "[CI_PR_NUMBER=$num]"
echo "[CI_PR_NUMBER=$num]"
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
---
set -ex

# Run a subset of tests. Used to run tests in parallel in multiple jobs.

# When this job partition is run as part of PR CI, skip tidy to allow revealing more failures. The
# dedicated `tidy` job failing won't block other PR CI jobs from completing, and so tidy failures
# shouldn't inhibit revealing other failures in PR CI jobs.
if [ "$PR_CI_JOB" == "1" ]; then
  echo "PR_CI_JOB set; skipping tidy"
  SKIP_TIDY="--skip tidy"
fi

../x.py --stage 2 test \
  ${SKIP_TIDY:+$SKIP_TIDY} \
  --skip compiler \
  --skip src
#!/bin/bash

set -ex

# Run a subset of tests. Used to run tests in parallel in multiple jobs.

# When this job partition is run as part of PR CI, skip tidy to allow revealing more failures. The
# dedicated `tidy` job failing won't block other PR CI jobs from completing, and so tidy failures
# shouldn't inhibit revealing other failures in PR CI jobs.
if [ "$PR_CI_JOB" == "1" ]; then
  echo "PR_CI_JOB set; skipping tidy"
  SKIP_TIDY="--skip tidy"
fi

../x.py --stage 2 test \
  ${SKIP_TIDY:+$SKIP_TIDY} \
  --skip tests \
  --skip coverage-map \
  --skip coverage-run \
  --skip library \
  --skip tidyselftest
---
Executing "/scripts/stage_2_test_set1.sh"
+ /scripts/stage_2_test_set1.sh
PR_CI_JOB set; skipping tidy
+ '[' 1 == 1 ']'
+ echo 'PR_CI_JOB set; skipping tidy'
+ SKIP_TIDY='--skip tidy'
+ ../x.py --stage 2 test --skip tidy --skip compiler --skip src
##[group]Building bootstrap
    Finished `dev` profile [unoptimized] target(s) in 0.04s
##[endgroup]
downloading https://static.rust-lang.org/dist/2026-01-21/rustfmt-nightly-aarch64-unknown-linux-gnu.tar.xz
---
test [ui] tests/ui/abi/abi-sysv64-register-usage.rs ... ignored, ignored when the architecture is aarch64
test [ui] tests/ui/abi/abi-typo-unstable.rs#feature_enabled ... ok
test [ui] tests/ui/abi/abi-typo-unstable.rs#feature_disabled ... ok
test [ui] tests/ui/abi/anon-extern-mod.rs ... ok
test [ui] tests/ui/abi/avr-sram.rs#disable_sram ... ok
test [ui] tests/ui/abi/arm-unadjusted-intrinsic.rs#aarch64 ... ok
test [ui] tests/ui/abi/avr-sram.rs#has_sram ... ok
test [ui] tests/ui/abi/avr-sram.rs#no_sram ... ok
test [ui] tests/ui/abi/arm-unadjusted-intrinsic.rs#arm ... ok
test [ui] tests/ui/abi/bad-custom.rs ... ok
test [ui] tests/ui/abi/c-stack-as-value.rs ... ok
test [ui] tests/ui/abi/c-zst.rs#aarch64-darwin ... ok
test [ui] tests/ui/abi/c-zst.rs#powerpc-linux ... ok
---
test [ui] tests/ui/asm/aarch64/may_unwind.rs ... ok
test [ui] tests/ui/asm/aarch64/type-check-3.rs ... ok
test [ui] tests/ui/asm/aarch64/type-check-2.rs ... ok
test [ui] tests/ui/asm/aarch64/type-f16.rs ... ok
test [ui] tests/ui/asm/aarch64v8r.rs#hf ... ok
test [ui] tests/ui/asm/aarch64v8r.rs#r82 ... ok
test [ui] tests/ui/asm/aarch64/sym.rs ... ok
test [ui] tests/ui/asm/aarch64v8r.rs#sf ... ok
test [ui] tests/ui/asm/asm-with-nested-closure.rs ... ok
test [ui] tests/ui/asm/binary_asm_labels.rs ... ignored, only executed when the architecture is x86_64
test [ui] tests/ui/asm/arm-low-dreg.rs ... ok
test [ui] tests/ui/asm/bad-template.rs#aarch64 ... ok
test [ui] tests/ui/asm/cfg.rs#reva ... ignored, only executed when the architecture is x86_64
---
test [ui] tests/ui/const-generics/occurs-check/unused-substs-3.rs ... ok
test [ui] tests/ui/const-generics/occurs-check/unused-substs-4.rs ... ok
test [ui] tests/ui/const-generics/ogca/basic-fail.rs ... ok
test [ui] tests/ui/const-generics/occurs-check/unused-substs-5.rs ... ok
test [ui] tests/ui/const-generics/ogca/basic.rs ... ok
test [ui] tests/ui/const-generics/ogca/coherence-ambiguous.rs ... ok
test [ui] tests/ui/const-generics/ogca/generic-param-rhs.rs ... ok
test [ui] tests/ui/const-generics/ogca/rhs-but-not-root.rs ... ok
test [ui] tests/ui/const-generics/opaque_types.rs ... ok
test [ui] tests/ui/const-generics/outer-lifetime-in-const-generic-default.rs ... ok
test [ui] tests/ui/const-generics/opaque_types2.rs ... ok
test [ui] tests/ui/const-generics/overlapping_impls.rs ... ok
test [ui] tests/ui/const-generics/params-in-ct-in-ty-param-lazy-norm.rs#full ... ok
---
test [ui] tests/ui/extern/issue-64655-extern-rust-must-allow-unwind.rs#fat3 ... ok
test [ui] tests/ui/extern/issue-64655-extern-rust-must-allow-unwind.rs#thin1 ... ok
test [ui] tests/ui/extern/issue-80074.rs ... ok
test [ui] tests/ui/extern/issue-95829.rs ... ok
test [ui] tests/ui/extern/lgamma-linkage.rs ... ok
test [ui] tests/ui/extern/not-in-block.rs ... ok
test [ui] tests/ui/extern/no-mangle-associated-fn.rs ... ok
test [ui] tests/ui/extern/unsized-extern-derefmove.rs ... ok
test [ui] tests/ui/feature-gates/allow-features-empty.rs ... ok
test [ui] tests/ui/feature-gates/allow-features.rs ... ok
---
test [ui] tests/ui/feature-gates/feature-gate-macro-derive.rs ... ok
test [ui] tests/ui/feature-gates/feature-gate-macro-metavar-expr-concat.rs ... ok
test [ui] tests/ui/feature-gates/feature-gate-marker_trait_attr.rs ... ok
test [ui] tests/ui/feature-gates/feature-gate-may-dangle.rs ... ok
test [ui] tests/ui/feature-gates/feature-gate-mgca-type-const-syntax.rs ... ok
test [ui] tests/ui/feature-gates/feature-gate-min-generic-const-args.rs ... ok
test [ui] tests/ui/feature-gates/feature-gate-movrs_target_feature.rs ... ignored, only executed when the architecture is x86_64
test [ui] tests/ui/feature-gates/feature-gate-min_const_fn.rs ... ok
test [ui] tests/ui/feature-gates/feature-gate-more-maybe-bounds.rs ... ok
test [ui] tests/ui/feature-gates/feature-gate-naked_functions_rustic_abi.rs ... ignored, only executed when the architecture is x86_64
---
test [ui] tests/ui/imports/ambiguous-7.rs ... ok
test [ui] tests/ui/imports/ambiguous-import-visibility-module.rs ... ok
test [ui] tests/ui/imports/ambiguous-8.rs ... ok
test [ui] tests/ui/imports/ambiguous-glob-vs-expanded-extern.rs ... ok
test [ui] tests/ui/imports/ambiguous-panic-globvsglob.rs ... ok
test [ui] tests/ui/imports/ambiguous-panic-glob-vs-multiouter.rs ... ok
test [ui] tests/ui/imports/ambiguous-panic-non-prelude-core-glob.rs ... ok
test [ui] tests/ui/imports/ambiguous-panic-no-implicit-prelude.rs ... ok
test [ui] tests/ui/imports/ambiguous-panic-non-prelude-std-glob.rs ... ok
test [ui] tests/ui/imports/ambiguous-panic-pick-core.rs ... ok
test [ui] tests/ui/imports/ambiguous-panic-pick-std.rs ... ok
---
test [ui] tests/ui/layout/randomize.rs#randomize-layout ... ok
test [ui] tests/ui/layout/null-pointer-optimization.rs ... ok
test [ui] tests/ui/layout/reprc-power-alignment.rs ... ok
test [ui] tests/ui/layout/size-of-val-raw-too-big.rs ... ignored, only executed when the pointer width is 32bit (Layout computation rejects this layout for different reasons on 64-bit.)
test [ui] tests/ui/layout/rigid-alias-due-to-broken-impl.rs ... ok
test [ui] tests/ui/layout/struct.rs ... ok
test [ui] tests/ui/layout/rust-call-abi-not-a-tuple-ice-81974.rs ... ok
test [ui] tests/ui/layout/rigid-alias-no-params.rs ... ok
test [ui] tests/ui/layout/thaw-transmute-invalid-enum.rs ... ok
test [ui] tests/ui/layout/thaw-validate-invalid-enum.rs ... ok
---
---- [ui] tests/ui/stats/macro-stats.rs stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/stats/macro-stats/macro-stats.stderr`
diff of stderr:

8 macro-stats q!                                    1         26       26.0        519      519.0
9 macro-stats #[derive(Ord)]                        1         15       15.0        503      503.0
10 macro-stats #[derive(Default)]                    2         16        8.0        403      201.5
- macro-stats #[derive(Eq)]                         1         10       10.0        298      298.0
+ macro-stats #[derive(Eq)]                         1         11       11.0        311      311.0
12 macro-stats #[derive(Debug)]                      1          8        8.0        277      277.0
13 macro-stats #[derive(PartialEq)]                  1          9        9.0        267      267.0
14 macro-stats #[derive(Copy)]                       1          2        2.0         61       61.0


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 stats/macro-stats.rs`

error: 1 errors occurred comparing output.
status: exit status: 0
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/stats/macro-stats.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/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--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/aarch64-unknown-linux-gnu/test/ui/stats/macro-stats" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "-Zmacro-stats"
stdout: none
--- stderr -------------------------------
macro-stats ===================================================================================
macro-stats MACRO EXPANSION STATS: macro_stats
macro-stats Macro Name                         Uses      Lines  Avg Lines      Bytes  Avg Bytes
macro-stats -----------------------------------------------------------------------------------
macro-stats #[derive(Clone)]                      8         67        8.4      1_879      234.9
macro-stats #[derive(PartialOrd)]                 1         17       17.0        675      675.0
macro-stats #[derive(Hash)]                       2         17        8.5        565      282.5
macro-stats q!                                    1         26       26.0        519      519.0
macro-stats #[derive(Ord)]                        1         15       15.0        503      503.0
macro-stats #[derive(Default)]                    2         16        8.0        403      201.5
macro-stats #[derive(Eq)]                         1         11       11.0        311      311.0
macro-stats #[derive(Debug)]                      1          8        8.0        277      277.0
macro-stats #[derive(PartialEq)]                  1          9        9.0        267      267.0
macro-stats #[derive(Copy)]                       1          2        2.0         61       61.0
macro-stats p!                                    1          3        3.0         32       32.0
macro-stats trait_impl_tys!                       1          2        2.0         28       28.0
macro-stats foreign_item!                         1          1        1.0         21       21.0
macro-stats long_name_that_doesnt_fit_on_one_line!
macro-stats                                       1          1        1.0         18       18.0
macro-stats impl_const!                           1          1        1.0         17       17.0
macro-stats trait_tys!                            1          2        2.0         15       15.0
macro-stats n99!                                  2          2        1.0          4        2.0
macro-stats none!                                 1          1        1.0          4        4.0
macro-stats u32!                                  1          1        1.0          3        3.0
macro-stats long_name_that_fits_on_one_line!     10         10        1.0          0        0.0
macro-stats long_name_that_fits_on_one_line_____! 1          1        1.0          0        0.0
macro-stats long_name_that_fits_on_one_line____!  1          1        1.0          0        0.0
macro-stats long_name_that_fits_on_one_line___!   1          1        1.0          0        0.0
macro-stats long_name_that_fits_on_one_line__!    1          1        1.0          0        0.0
macro-stats long_name_that_fits_on_one_line_!     1          1        1.0          0        0.0
macro-stats #[test]                               1          1        1.0          0        0.0
macro-stats ===================================================================================
------------------------------------------

---- [ui] tests/ui/stats/macro-stats.rs stdout end ----
---- [ui] tests/ui/symbol-names/const-generics-structural-demangling.rs stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/symbol-names/const-generics-structural-demangling/const-generics-structural-demangling.stderr`
diff of stderr:

124 LL | #[rustc_symbol_name]
125    | ^^^^^^^^^^^^^^^^^^^^
126 
- error: symbol-name(_RMsd_CsCRATE_HASH_1cINtB<REF>_4Bar_KVNtB<REF>_3BarS1xh7b_s_1xt1000_EE)
+ error: symbol-name(_RMsf_CsCRATE_HASH_1cINtB<REF>_4Bar_KVNtB<REF>_3BarS1xh7b_s_1xt1000_EE)
128   --> $DIR/const-generics-structural-demangling.rs:93:5
129    |
130 LL |     #[rustc_symbol_name]

Note: some mismatched output was normalized before being compared
- error: symbol-name(_RMsf_Cs6IRxgSShgKb_1cINtB3_4Bar_KVNtB3_3BarS1xh7b_s_1xt1000_EE)
-   --> /checkout/tests/ui/symbol-names/const-generics-structural-demangling.rs:93:5
+ error: symbol-name(_RMsf_CsCRATE_HASH_1cINtB<REF>_4Bar_KVNtB<REF>_3BarS1xh7b_s_1xt1000_EE)


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 symbol-names/const-generics-structural-demangling.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/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/symbol-names/const-generics-structural-demangling.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/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--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" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/symbol-names/const-generics-structural-demangling" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "-C" "symbol-mangling-version=v0" "--crate-name=c"
stdout: none
--- stderr -------------------------------
error: symbol-name(_RMCs6IRxgSShgKb_1cINtB0_7RefByteKRh7b_E)
##[error]  --> /checkout/tests/ui/symbol-names/const-generics-structural-demangling.rs:13:1
   |
LL | #[rustc_symbol_name]
   | ^^^^^^^^^^^^^^^^^^^^

error: demangling(<c[4e5061322b75ab09]::RefByte<{&123u8}>>)
##[error]  --> /checkout/tests/ui/symbol-names/const-generics-structural-demangling.rs:13:1
   |
LL | #[rustc_symbol_name]
   | ^^^^^^^^^^^^^^^^^^^^

error: demangling-alt(<c::RefByte<{&123}>>)
##[error]  --> /checkout/tests/ui/symbol-names/const-generics-structural-demangling.rs:13:1
   |
LL | #[rustc_symbol_name]
   | ^^^^^^^^^^^^^^^^^^^^

error: symbol-name(_RMs_Cs6IRxgSShgKb_1cINtB2_6RefZstKRAEE)
##[error]  --> /checkout/tests/ui/symbol-names/const-generics-structural-demangling.rs:23:1
   |
LL | #[rustc_symbol_name]
   | ^^^^^^^^^^^^^^^^^^^^

error: demangling(<c[4e5061322b75ab09]::RefZst<{&[]}>>)
##[error]  --> /checkout/tests/ui/symbol-names/const-generics-structural-demangling.rs:23:1
   |
LL | #[rustc_symbol_name]
   | ^^^^^^^^^^^^^^^^^^^^

error: demangling-alt(<c::RefZst<{&[]}>>)
##[error]  --> /checkout/tests/ui/symbol-names/const-generics-structural-demangling.rs:23:1
   |
LL | #[rustc_symbol_name]
   | ^^^^^^^^^^^^^^^^^^^^

error: symbol-name(_RMs0_Cs6IRxgSShgKb_1cINtB3_11Array3BytesKAh1_h2_h3_EE)
##[error]  --> /checkout/tests/ui/symbol-names/const-generics-structural-demangling.rs:31:1
   |
LL | #[rustc_symbol_name]
   | ^^^^^^^^^^^^^^^^^^^^

error: demangling(<c[4e5061322b75ab09]::Array3Bytes<{[1u8, 2u8, 3u8]}>>)
##[error]  --> /checkout/tests/ui/symbol-names/const-generics-structural-demangling.rs:31:1
   |
LL | #[rustc_symbol_name]
   | ^^^^^^^^^^^^^^^^^^^^

error: demangling-alt(<c::Array3Bytes<{[1, 2, 3]}>>)
##[error]  --> /checkout/tests/ui/symbol-names/const-generics-structural-demangling.rs:31:1
   |
LL | #[rustc_symbol_name]
   | ^^^^^^^^^^^^^^^^^^^^

error: symbol-name(_RMs1_Cs6IRxgSShgKb_1cINtB3_13TupleByteBoolKTh1_b0_EE)
##[error]  --> /checkout/tests/ui/symbol-names/const-generics-structural-demangling.rs:39:1
   |
LL | #[rustc_symbol_name]
   | ^^^^^^^^^^^^^^^^^^^^

error: demangling(<c[4e5061322b75ab09]::TupleByteBool<{(1u8, false)}>>)
##[error]  --> /checkout/tests/ui/symbol-names/const-generics-structural-demangling.rs:39:1
   |
LL | #[rustc_symbol_name]
   | ^^^^^^^^^^^^^^^^^^^^

error: demangling-alt(<c::TupleByteBool<{(1, false)}>>)
##[error]  --> /checkout/tests/ui/symbol-names/const-generics-structural-demangling.rs:39:1
   |
LL | #[rustc_symbol_name]
   | ^^^^^^^^^^^^^^^^^^^^

error: symbol-name(_RMs2_Cs6IRxgSShgKb_1cINtB3_11OptionUsizeKVNtINtB3_8MyOptionjE4NoneUE)
##[error]  --> /checkout/tests/ui/symbol-names/const-generics-structural-demangling.rs:55:1
   |
LL | #[rustc_symbol_name]
   | ^^^^^^^^^^^^^^^^^^^^

error: demangling(<c[4e5061322b75ab09]::OptionUsize<{c[4e5061322b75ab09]::MyOption::<usize>::None}>>)
##[error]  --> /checkout/tests/ui/symbol-names/const-generics-structural-demangling.rs:55:1
   |
LL | #[rustc_symbol_name]
   | ^^^^^^^^^^^^^^^^^^^^

error: demangling-alt(<c::OptionUsize<{c::MyOption::<usize>::None}>>)
##[error]  --> /checkout/tests/ui/symbol-names/const-generics-structural-demangling.rs:55:1
   |
LL | #[rustc_symbol_name]
   | ^^^^^^^^^^^^^^^^^^^^

error: symbol-name(_RMs3_Cs6IRxgSShgKb_1cINtB3_11OptionUsizeKVNtINtB3_8MyOptionjE4SomeTj0_EE)
##[error]  --> /checkout/tests/ui/symbol-names/const-generics-structural-demangling.rs:63:1
   |
LL | #[rustc_symbol_name]
   | ^^^^^^^^^^^^^^^^^^^^

error: demangling(<c[4e5061322b75ab09]::OptionUsize<{c[4e5061322b75ab09]::MyOption::<usize>::Some(0usize)}>>)
##[error]  --> /checkout/tests/ui/symbol-names/const-generics-structural-demangling.rs:63:1
   |
LL | #[rustc_symbol_name]
   | ^^^^^^^^^^^^^^^^^^^^

error: demangling-alt(<c::OptionUsize<{c::MyOption::<usize>::Some(0)}>>)
##[error]  --> /checkout/tests/ui/symbol-names/const-generics-structural-demangling.rs:63:1
   |
LL | #[rustc_symbol_name]
   | ^^^^^^^^^^^^^^^^^^^^

error: symbol-name(_RMs4_Cs6IRxgSShgKb_1cINtB3_4Foo_KVNtB3_3FooS1sRe616263_2chc78_5sliceRAh1_h2_h3_EEE)
##[error]  --> /checkout/tests/ui/symbol-names/const-generics-structural-demangling.rs:77:1
   |
LL | #[rustc_symbol_name]
   | ^^^^^^^^^^^^^^^^^^^^

error: demangling(<c[4e5061322b75ab09]::Foo_<{c[4e5061322b75ab09]::Foo { s: "abc", ch: 'x', slice: &[1u8, 2u8, 3u8] }}>>)
##[error]  --> /checkout/tests/ui/symbol-names/const-generics-structural-demangling.rs:77:1
   |
LL | #[rustc_symbol_name]
   | ^^^^^^^^^^^^^^^^^^^^

error: demangling-alt(<c::Foo_<{c::Foo { s: "abc", ch: 'x', slice: &[1, 2, 3] }}>>)
##[error]  --> /checkout/tests/ui/symbol-names/const-generics-structural-demangling.rs:77:1
   |
LL | #[rustc_symbol_name]
   | ^^^^^^^^^^^^^^^^^^^^

error: symbol-name(_RMsf_Cs6IRxgSShgKb_1cINtB3_4Bar_KVNtB3_3BarS1xh7b_s_1xt1000_EE)
##[error]  --> /checkout/tests/ui/symbol-names/const-generics-structural-demangling.rs:93:5
   |
LL |     #[rustc_symbol_name]
   |     ^^^^^^^^^^^^^^^^^^^^
...
LL | duplicate_field_name_test!(x);
   | ----------------------------- in this macro invocation
   |
   = note: this error originates in the macro `duplicate_field_name_test` (in Nightly builds, run with -Z macro-backtrace for more info)

error: demangling(<c[4e5061322b75ab09]::Bar_<{c[4e5061322b75ab09]::Bar { x: 123u8, x: 4096u16 }}>>)
##[error]  --> /checkout/tests/ui/symbol-names/const-generics-structural-demangling.rs:93:5
   |
LL |     #[rustc_symbol_name]
   |     ^^^^^^^^^^^^^^^^^^^^
...
LL | duplicate_field_name_test!(x);
   | ----------------------------- in this macro invocation
   |
   = note: this error originates in the macro `duplicate_field_name_test` (in Nightly builds, run with -Z macro-backtrace for more info)

error: demangling-alt(<c::Bar_<{c::Bar { x: 123, x: 4096 }}>>)
##[error]  --> /checkout/tests/ui/symbol-names/const-generics-structural-demangling.rs:93:5
   |
LL |     #[rustc_symbol_name]
   |     ^^^^^^^^^^^^^^^^^^^^
...

</details>

rust-log-analyzer rust-log-analyzer commented on Feb 27, 2026 20:58 UTC
Contributor

The job aarch64-gnu-llvm-20-1 failed! Check out the build log: (web) (plain enhanced) (plain)

<details><summary><i>Click to see the possible cause of the failure (guessed by this bot)</i></summary>

/dev/sda15       98M  6.4M   92M   7% /boot/efi
tmpfs           1.6G   16K  1.6G   1% /run/user/1001
================================================================================

Sufficient disk space available (120307424KB >= 52428800KB). Skipping cleanup.
##[group]Run echo "[CI_PR_NUMBER=$num]"
echo "[CI_PR_NUMBER=$num]"
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
---
set -ex

# Run a subset of tests. Used to run tests in parallel in multiple jobs.

# When this job partition is run as part of PR CI, skip tidy to allow revealing more failures. The
# dedicated `tidy` job failing won't block other PR CI jobs from completing, and so tidy failures
# shouldn't inhibit revealing other failures in PR CI jobs.
if [ "$PR_CI_JOB" == "1" ]; then
  echo "PR_CI_JOB set; skipping tidy"
  SKIP_TIDY="--skip tidy"
fi

../x.py --stage 2 test \
  ${SKIP_TIDY:+$SKIP_TIDY} \
  --skip compiler \
  --skip src
#!/bin/bash

set -ex

# Run a subset of tests. Used to run tests in parallel in multiple jobs.

# When this job partition is run as part of PR CI, skip tidy to allow revealing more failures. The
# dedicated `tidy` job failing won't block other PR CI jobs from completing, and so tidy failures
# shouldn't inhibit revealing other failures in PR CI jobs.
if [ "$PR_CI_JOB" == "1" ]; then
  echo "PR_CI_JOB set; skipping tidy"
  SKIP_TIDY="--skip tidy"
fi

../x.py --stage 2 test \
  ${SKIP_TIDY:+$SKIP_TIDY} \
  --skip tests \
  --skip coverage-map \
  --skip coverage-run \
  --skip library \
  --skip tidyselftest
---
Executing "/scripts/stage_2_test_set1.sh"
+ /scripts/stage_2_test_set1.sh
PR_CI_JOB set; skipping tidy
+ '[' 1 == 1 ']'
+ echo 'PR_CI_JOB set; skipping tidy'
+ SKIP_TIDY='--skip tidy'
+ ../x.py --stage 2 test --skip tidy --skip compiler --skip src
##[group]Building bootstrap
    Finished `dev` profile [unoptimized] target(s) in 0.04s
##[endgroup]
downloading https://static.rust-lang.org/dist/2026-01-21/rustfmt-nightly-aarch64-unknown-linux-gnu.tar.xz
---
test [ui] tests/ui/abi/abi-sysv64-register-usage.rs ... ignored, ignored when the architecture is aarch64
test [ui] tests/ui/abi/abi-typo-unstable.rs#feature_disabled ... ok
test [ui] tests/ui/abi/abi-typo-unstable.rs#feature_enabled ... ok
test [ui] tests/ui/abi/anon-extern-mod.rs ... ok
test [ui] tests/ui/abi/avr-sram.rs#disable_sram ... ok
test [ui] tests/ui/abi/arm-unadjusted-intrinsic.rs#aarch64 ... ok
test [ui] tests/ui/abi/avr-sram.rs#has_sram ... ok
test [ui] tests/ui/abi/avr-sram.rs#no_sram ... ok
test [ui] tests/ui/abi/arm-unadjusted-intrinsic.rs#arm ... ok
test [ui] tests/ui/abi/bad-custom.rs ... ok
test [ui] tests/ui/abi/c-stack-as-value.rs ... ok
test [ui] tests/ui/abi/c-zst.rs#aarch64-darwin ... ok
test [ui] tests/ui/abi/c-zst.rs#s390x-linux ... ok
---
test [ui] tests/ui/asm/aarch64/type-check-2-2.rs ... ok
test [ui] tests/ui/asm/aarch64/type-check-3.rs ... ok
test [ui] tests/ui/asm/aarch64/type-check-2.rs ... ok
test [ui] tests/ui/asm/aarch64/type-f16.rs ... ok
test [ui] tests/ui/asm/aarch64v8r.rs#hf ... ok
test [ui] tests/ui/asm/aarch64v8r.rs#r82 ... ok
test [ui] tests/ui/asm/aarch64v8r.rs#sf ... ok
test [ui] tests/ui/asm/aarch64/sym.rs ... ok
test [ui] tests/ui/asm/arm-low-dreg.rs ... ok
test [ui] tests/ui/asm/binary_asm_labels.rs ... ignored, only executed when the architecture is x86_64
test [ui] tests/ui/asm/asm-with-nested-closure.rs ... ok
test [ui] tests/ui/asm/bad-template.rs#x86_64 ... ok
---
test [ui] tests/ui/const-generics/occurs-check/bind-param.rs ... ok
test [ui] tests/ui/const-generics/occurs-check/unused-substs-3.rs ... ok
test [ui] tests/ui/const-generics/occurs-check/unused-substs-4.rs ... ok
test [ui] tests/ui/const-generics/occurs-check/unused-substs-5.rs ... ok
test [ui] tests/ui/const-generics/ogca/basic-fail.rs ... ok
test [ui] tests/ui/const-generics/ogca/basic.rs ... ok
test [ui] tests/ui/const-generics/ogca/coherence-ambiguous.rs ... ok
test [ui] tests/ui/const-generics/ogca/generic-param-rhs.rs ... ok
test [ui] tests/ui/const-generics/ogca/rhs-but-not-root.rs ... ok
test [ui] tests/ui/const-generics/opaque_types.rs ... ok
test [ui] tests/ui/const-generics/outer-lifetime-in-const-generic-default.rs ... ok
test [ui] tests/ui/const-generics/opaque_types2.rs ... ok
test [ui] tests/ui/const-generics/overlapping_impls.rs ... ok
test [ui] tests/ui/const-generics/params-in-ct-in-ty-param-lazy-norm.rs#full ... ok
---
test [ui] tests/ui/extern/issue-64655-extern-rust-must-allow-unwind.rs#fat2 ... ok
test [ui] tests/ui/extern/issue-64655-extern-rust-must-allow-unwind.rs#fat3 ... ok
test [ui] tests/ui/extern/issue-80074.rs ... ok
test [ui] tests/ui/extern/issue-95829.rs ... ok
test [ui] tests/ui/extern/lgamma-linkage.rs ... ok
test [ui] tests/ui/extern/issue-64655-extern-rust-must-allow-unwind.rs#thin1 ... ok
test [ui] tests/ui/extern/not-in-block.rs ... ok
test [ui] tests/ui/extern/no-mangle-associated-fn.rs ... ok
test [ui] tests/ui/extern/unsized-extern-derefmove.rs ... ok
test [ui] tests/ui/feature-gates/allow-features-empty.rs ... ok
---
test [ui] tests/ui/feature-gates/feature-gate-macro-attr.rs ... ok
test [ui] tests/ui/feature-gates/feature-gate-macro-metavar-expr-concat.rs ... ok
test [ui] tests/ui/feature-gates/feature-gate-marker_trait_attr.rs ... ok
test [ui] tests/ui/feature-gates/feature-gate-may-dangle.rs ... ok
test [ui] tests/ui/feature-gates/feature-gate-mgca-type-const-syntax.rs ... ok
test [ui] tests/ui/feature-gates/feature-gate-min-generic-const-args.rs ... ok
test [ui] tests/ui/feature-gates/feature-gate-movrs_target_feature.rs ... ignored, only executed when the architecture is x86_64
test [ui] tests/ui/feature-gates/feature-gate-min_const_fn.rs ... ok
test [ui] tests/ui/feature-gates/feature-gate-more-qualified-paths.rs ... ok
test [ui] tests/ui/feature-gates/feature-gate-naked_functions_rustic_abi.rs ... ignored, only executed when the architecture is x86_64
---
test [ui] tests/ui/imports/ambiguous-7.rs ... ok
test [ui] tests/ui/imports/ambiguous-import-visibility-module.rs ... ok
test [ui] tests/ui/imports/ambiguous-8.rs ... ok
test [ui] tests/ui/imports/ambiguous-glob-vs-expanded-extern.rs ... ok
test [ui] tests/ui/imports/ambiguous-panic-glob-vs-multiouter.rs ... ok
test [ui] tests/ui/imports/ambiguous-panic-globvsglob.rs ... ok
test [ui] tests/ui/imports/ambiguous-panic-no-implicit-prelude.rs ... ok
test [ui] tests/ui/imports/ambiguous-panic-non-prelude-core-glob.rs ... ok
test [ui] tests/ui/imports/ambiguous-panic-non-prelude-std-glob.rs ... ok
test [ui] tests/ui/imports/ambiguous-panic-pick-core.rs ... ok
test [ui] tests/ui/imports/ambiguous-panic-pick-std.rs ... ok
---
test [ui] tests/ui/layout/post-mono-layout-cycle.rs ... ok
test [ui] tests/ui/layout/randomize.rs#normal ... ok
test [ui] tests/ui/layout/randomize.rs#randomize-layout ... ok
test [ui] tests/ui/layout/null-pointer-optimization.rs ... ok
test [ui] tests/ui/layout/rigid-alias-due-to-broken-impl.rs ... ok
test [ui] tests/ui/layout/size-of-val-raw-too-big.rs ... ignored, only executed when the pointer width is 32bit (Layout computation rejects this layout for different reasons on 64-bit.)
test [ui] tests/ui/layout/reprc-power-alignment.rs ... ok
test [ui] tests/ui/layout/struct.rs ... ok
test [ui] tests/ui/layout/thaw-validate-invalid-enum.rs ... ok
test [ui] tests/ui/layout/rust-call-abi-not-a-tuple-ice-81974.rs ... ok
---
---- [ui] tests/ui/stats/macro-stats.rs stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/stats/macro-stats/macro-stats.stderr`
diff of stderr:

8 macro-stats q!                                    1         26       26.0        519      519.0
9 macro-stats #[derive(Ord)]                        1         15       15.0        503      503.0
10 macro-stats #[derive(Default)]                    2         16        8.0        403      201.5
- macro-stats #[derive(Eq)]                         1         10       10.0        298      298.0
+ macro-stats #[derive(Eq)]                         1         11       11.0        311      311.0
12 macro-stats #[derive(Debug)]                      1          8        8.0        277      277.0
13 macro-stats #[derive(PartialEq)]                  1          9        9.0        267      267.0
14 macro-stats #[derive(Copy)]                       1          2        2.0         61       61.0


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 stats/macro-stats.rs`

error: 1 errors occurred comparing output.
status: exit status: 0
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/stats/macro-stats.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/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--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/aarch64-unknown-linux-gnu/test/ui/stats/macro-stats" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "-Zmacro-stats"
stdout: none
--- stderr -------------------------------
macro-stats ===================================================================================
macro-stats MACRO EXPANSION STATS: macro_stats
macro-stats Macro Name                         Uses      Lines  Avg Lines      Bytes  Avg Bytes
macro-stats -----------------------------------------------------------------------------------
macro-stats #[derive(Clone)]                      8         67        8.4      1_879      234.9
macro-stats #[derive(PartialOrd)]                 1         17       17.0        675      675.0
macro-stats #[derive(Hash)]                       2         17        8.5        565      282.5
macro-stats q!                                    1         26       26.0        519      519.0
macro-stats #[derive(Ord)]                        1         15       15.0        503      503.0
macro-stats #[derive(Default)]                    2         16        8.0        403      201.5
macro-stats #[derive(Eq)]                         1         11       11.0        311      311.0
macro-stats #[derive(Debug)]                      1          8        8.0        277      277.0
macro-stats #[derive(PartialEq)]                  1          9        9.0        267      267.0
macro-stats #[derive(Copy)]                       1          2        2.0         61       61.0
macro-stats p!                                    1          3        3.0         32       32.0
macro-stats trait_impl_tys!                       1          2        2.0         28       28.0
macro-stats foreign_item!                         1          1        1.0         21       21.0
macro-stats long_name_that_doesnt_fit_on_one_line!
macro-stats                                       1          1        1.0         18       18.0
macro-stats impl_const!                           1          1        1.0         17       17.0
macro-stats trait_tys!                            1          2        2.0         15       15.0
macro-stats n99!                                  2          2        1.0          4        2.0
macro-stats none!                                 1          1        1.0          4        4.0
macro-stats u32!                                  1          1        1.0          3        3.0
macro-stats long_name_that_fits_on_one_line!     10         10        1.0          0        0.0
macro-stats long_name_that_fits_on_one_line_____! 1          1        1.0          0        0.0
macro-stats long_name_that_fits_on_one_line____!  1          1        1.0          0        0.0
macro-stats long_name_that_fits_on_one_line___!   1          1        1.0          0        0.0
macro-stats long_name_that_fits_on_one_line__!    1          1        1.0          0        0.0
macro-stats long_name_that_fits_on_one_line_!     1          1        1.0          0        0.0
macro-stats #[test]                               1          1        1.0          0        0.0
macro-stats ===================================================================================
------------------------------------------

---- [ui] tests/ui/stats/macro-stats.rs stdout end ----

failures:

</details>

KiChjang KiChjang commented on Feb 28, 2026 00:45 UTC
Author

Looks like CI is passing now, r? @nnethercote

rustbot rustbot commented on Feb 28, 2026 00:45 UTC
Contributor

Requested reviewer is already assigned to this pull request.

Please choose another assignee.

cyrgani cyrgani commented on Feb 28, 2026 13:19 UTC
Contributor

You should be able to delete the fn assert_fields_are_eq(&self) {} method from the Eq trait again now.

cyrgani cyrgani commented on Feb 28, 2026 13:21 UTC
Contributor

Could you also add a test that something like

fn main() {
    X::assert_fields_are_eq();
}
#[derive(PartialEq, Eq)]
struct X(u8);

will not compile?

cyrgani cyrgani commented on code on Feb 28, 2026 13:24 UTC
Code Review
compiler/rustc_builtin_macros/src/deriving/cmp/eq.rs:1
@@ -18,42 +17,179 @@ pub(crate) fn expand_deriving_eq(
 ) {
     let span = cx.with_def_site_ctxt(span);
 
+    let mut impl_generics = ast::Generics::default();
+    let mut impl_self_ty = None;
+
     let trait_def = TraitDef {
         span,
         path: path_std!(cmp::Eq),
         skip_path_as_bound: false,
         needs_copy_as_bound_if_packed: true,
         additional_bounds: Vec::new(),
         supports_unions: true,
-        methods: vec![MethodDef {
-            name: sym::assert_fields_are_eq,
-            generics: Bounds::empty(),
-            explicit_self: true,
-            nonself_args: vec![],
-            ret_ty: Unit,
-            attributes: thin_vec![
-                cx.attr_nested_word(sym::doc, sym::hidden, span),
-                cx.attr_nested_word(sym::coverage, sym::off, span),
-            ],
-            fieldless_variants_strategy: FieldlessVariantsStrategy::Unify,
-            combine_substructure: combine_substructure(Box::new(|a, b, c| {
-                cs_total_eq_assert(a, b, c)
-            })),
-        }],
+        methods: Vec::new(),
         associated_types: Vec::new(),
         is_const,
         is_staged_api_crate: cx.ecfg.features.staged_api(),
         safety: Safety::Default,
         document: true,
     };
-    trait_def.expand_ext(cx, mitem, item, push, true)
+    trait_def.expand_ext(
+        cx,
+        mitem,
+        item,
+        &mut |mut a| {
+            let Annotatable::Item(item) = &mut a else {
+                unreachable!("should have emitted an Item in trait_def.expand_ext");
+            };
+            let ast::ItemKind::Impl(imp) = &mut item.kind else {
+                unreachable!("should have emitted an Impl in trait_def.expand_ext");
+            };
+            impl_generics = imp.generics.clone();
+            impl_self_ty = Some(imp.self_ty.clone());
+            respan_generics_for_derive(&mut imp.generics, span);
+            push(a)
+        },
+        true,
+    );
+
+    let assert_stmts = eq_assert_stmts_from_item(cx, span, item);
+
+    // Skip generating `assert_fields_are_eq` impl if there are no assertions to make
+    if assert_stmts.is_empty() {
+        return;
+    }
+
+    let impl_self_ty = impl_self_ty
+        .unwrap_or_else(|| cx.dcx().span_bug(span, "missing self type in `derive(Eq)`"));
+    push(Annotatable::Item(assert_fields_are_eq_impl(
+        cx,
+        span,
+        strip_const_trait_bounds_from_generics(impl_generics),
+        impl_self_ty,
+        assert_stmts,
+    )));
+}
+
+fn respan_generics_for_derive(generics: &mut ast::Generics, span: Span) {
+    for predicate in &mut generics.where_clause.predicates {
+        predicate.span = span.with_ctxt(predicate.span.ctxt());
+
+        match &mut predicate.kind {
+            ast::WherePredicateKind::BoundPredicate(bound_predicate) => {
+                bound_predicate.bounded_ty.span =
+                    span.with_ctxt(bound_predicate.bounded_ty.span.ctxt());
+
+                for bound in &mut bound_predicate.bounds {
+                    match bound {
+                        ast::GenericBound::Trait(poly_trait_ref) => {
+                            poly_trait_ref.span = span.with_ctxt(poly_trait_ref.span.ctxt());
+                        }
+                        _ => {}
+                    }
+                }
+            }
+            ast::WherePredicateKind::RegionPredicate(region_predicate) => {
+                for bound in &mut region_predicate.bounds {
+                    match bound {
+                        ast::GenericBound::Trait(poly_trait_ref) => {
+                            poly_trait_ref.span = span.with_ctxt(poly_trait_ref.span.ctxt());
+                        }
+                        _ => {}
+                    }
+                }
+            }
+            ast::WherePredicateKind::EqPredicate(eq_predicate) => {
+                eq_predicate.lhs_ty.span = span.with_ctxt(eq_predicate.lhs_ty.span.ctxt());
+                eq_predicate.rhs_ty.span = span.with_ctxt(eq_predicate.rhs_ty.span.ctxt());
+            }
+        }
+    }
+    generics.where_clause.span = span.with_ctxt(generics.where_clause.span.ctxt());
+    generics.span = span.with_ctxt(generics.span.ctxt());
 }
 
-fn cs_total_eq_assert(
+fn assert_fields_are_eq_impl(
     cx: &ExtCtxt<'_>,
-    trait_span: Span,
-    substr: &Substructure<'_>,
-) -> BlockOrExpr {
+    span: Span,
+    impl_generics: ast::Generics,
+    impl_self_ty: Box<ast::Ty>,
+    assert_stmts: ThinVec<ast::Stmt>,
+) -> Box<ast::Item> {
+    cx.item(
+        span,
+        ast::AttrVec::new(),
+        ast::ItemKind::Impl(ast::Impl {
+            generics: impl_generics,
+            of_trait: None,
+            constness: ast::Const::No,
+            self_ty: impl_self_ty,
+            items: thin_vec![Box::new(ast::AssocItem {
+                id: ast::DUMMY_NODE_ID,
+                attrs: thin_vec![
+                    cx.attr_nested_word(sym::doc, sym::hidden, span),
+                    cx.attr_nested_word(sym::coverage, sym::off, span),

I guess this will also need #[inline] like https://github.com/rust-lang/rust/pull/153157?

nnethercote nnethercote commented on Mar 01, 2026 00:43 UTC
Reviewer

This is now completely different to the original idea of using a const. I'm no lang expert, but injecting X::assert_fields_are_eq doesn't seem acceptable to me.

Beyond that, I've only skimmed the PR so far. I think the 8 commits should be squashed down to 1 or 2. I'm also surprised at how much extra code is required in eq.rs to generate a slight variation on what is currently generated.

View changes since this review

KiChjang KiChjang commented on Mar 01, 2026 18:29 UTC
Author

Could you also add a test that something like

>
> fn main() {
>     X::assert_fields_are_eq();
> }
> #[derive(PartialEq, Eq)]
> struct X(u8);
> 

> will not compile?

This probably would still compile, since what I essentially did was move the trait method to be under an inherent impl instead, which is probably why it isn't desirable.

Given so, I'd probably need to revert to the original idea of using a const item block, however the const fn would still have to stay the same because I'd still need to somehow bring all lifetime/type parameters into scope, and if we don't use an impl, then a fn is the minimal vehicle to do so.

nnethercote nnethercote commented on Mar 01, 2026 21:09 UTC
Contributor

This probably would still compile, since what I essentially did was move the trait method to be under an inherent impl instead, which is probably why it isn't desirable.

That's right. Currently we have a hidden method in Eq, which users can (intentionally or unintentionally) interact with. With an inherent method that exposure is increased. With an anonymous const it becomes impossible for users to interact with it.

cyrgani cyrgani commented on Mar 01, 2026 21:32 UTC
Contributor

I've built the compiler with this PR's changes applied and the code I posted above still (correctly) does not compile.(probably due to some hygiene rules that make the function name unaccessible outside the #[derive(Eq)] invocation). So this does not seem to be a problem?

KiChjang KiChjang commented on Mar 01, 2026 21:49 UTC
Author

Ah, it's likely due to visibility issues -- it's not accessible publicly, but if you call it within an impl block for the type, then it would compile. Example:

fn main() {
    X::foo();
}
#[derive(PartialEq, Eq)]
struct X(u8);
impl X {
    pub fn foo() {
        Self::assert_fields_are_eq();
    }
}

I have local changes that revert the emitted code to be using a const impl block with a const fn inside of it, however some UI test expectations need to be updated as a result of that change. Will push as soon as I get around to fix them.

rust-bors[bot] rust-bors[bot] commented on Mar 02, 2026 06:42 UTC
Bot

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

madsmtm madsmtm commented on Mar 02, 2026 08:58 UTC
Reviewer

Did you explore what I wrote briefly in https://github.com/rust-lang/rust/pull/149978#discussion_r2795645435, to do something like:

#[derive(PartialEq, Eq)]
pub struct A<'a, T> {
    field1: &'a [T],
    field2: Option<Box<Self>>,
}

// Generates

const _: () = {
    struct __AssertIsEq<'a, T: core::eq::Eq> {
        field1: core::eq::AssertParamIsEq<&'a [T]>,
        field2: core::eq::AssertParamIsEq<Option<Box<Self>>>,
    }
    impl<'a, T: core::eq::PartialEq> PartialEq for __AssertIsEq<'a, T> {
        #[inline]
        fn eq(&self, other: &Self) -> bool { unimplemented!() }
    }
    impl<'a, T: core::eq::Eq> Eq for __AssertIsEq<'a, T> {}
};

Also, this is apparently perf-sensitive, please remember to do a perf-run before merging.

View changes since this review

rustbot rustbot commented on Mar 02, 2026 11:29 UTC
Contributor

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

KiChjang KiChjang commented on Mar 02, 2026 11:35 UTC
Author

@bors try @rust-timer queue

rust-bors[bot] rust-bors[bot] commented on Mar 02, 2026 11:35 UTC
Bot

@KiChjang: :key: Insufficient privileges: not in try users

rust-timer rust-timer commented on Mar 02, 2026 11:35 UTC
Contributor

Insufficient permissions to issue commands to rust-timer.
<!-- rust-timer: temporary -->

KiChjang KiChjang commented on Mar 02, 2026 11:38 UTC
Author

Did you explore what I wrote briefly in #149978 (comment), to do something like:

>
> #[derive(PartialEq, Eq)]
> pub struct A<'a, T> {
>     field1: &'a [T],
>     field2: Option<Box<Self>>,
> }
> 
> // Generates
> 
> const _: () = {
>     struct __AssertIsEq<'a, T: core::eq::Eq> {
>         field1: core::eq::AssertParamIsEq<&'a [T]>,
>         field2: core::eq::AssertParamIsEq<Option<Box<Self>>>,
>     }
>     impl<'a, T: core::eq::PartialEq> PartialEq for __AssertIsEq<'a, T> {
>         #[inline]
>         fn eq(&self, other: &Self) -> bool { unimplemented!() }
>     }
>     impl<'a, T: core::eq::Eq> Eq for __AssertIsEq<'a, T> {}
> };
> 

> Also, this is apparently perf-sensitive, please remember to do a perf-run before merging.

> _View changes since this review_

This seems to emit quite a lot of boilerplate for the purpose of making sure that AssertParamIsEq is being properly typechecked, so I opted for a const fn approach. I may be wrong though -- let's use benchmarking to test out whether I'm putting in more overhead or not.

Would appreciate some help in putting this on the timer queue though as I don't have sufficient permissions.

cyrgani cyrgani commented on code on Mar 02, 2026 11:40 UTC
Code Review
tests/ui/deriving/deriving-all-codegen.stdout:1
@@ -226,11 +222,12 @@ impl ::core::cmp::PartialEq for PackedPoint {
     }
 }
 #[automatically_derived]
-impl ::core::cmp::Eq for PackedPoint {
-    #[inline]
+impl ::core::cmp::Eq for PackedPoint { }
+const {

This isn't even valid syntax, it should be const _: () = {.

rust-log-analyzer rust-log-analyzer commented on Mar 02, 2026 11:45 UTC
Contributor

The job aarch64-gnu-llvm-20-1 failed! Check out the build log: (web) (plain enhanced) (plain)

<details><summary><i>Click to see the possible cause of the failure (guessed by this bot)</i></summary>

/dev/sda15       98M  6.4M   92M   7% /boot/efi
tmpfs           1.6G   16K  1.6G   1% /run/user/1001
================================================================================

Sufficient disk space available (120307296KB >= 52428800KB). Skipping cleanup.
##[group]Run echo "[CI_PR_NUMBER=$num]"
echo "[CI_PR_NUMBER=$num]"
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
---
set -ex

# Run a subset of tests. Used to run tests in parallel in multiple jobs.

# When this job partition is run as part of PR CI, skip tidy to allow revealing more failures. The
# dedicated `tidy` job failing won't block other PR CI jobs from completing, and so tidy failures
# shouldn't inhibit revealing other failures in PR CI jobs.
if [ "$PR_CI_JOB" == "1" ]; then
  echo "PR_CI_JOB set; skipping tidy"
  SKIP_TIDY="--skip tidy"
fi

../x.py --stage 2 test \
  ${SKIP_TIDY:+$SKIP_TIDY} \
  --skip compiler \
  --skip src
#!/bin/bash

set -ex

# Run a subset of tests. Used to run tests in parallel in multiple jobs.

# When this job partition is run as part of PR CI, skip tidy to allow revealing more failures. The
# dedicated `tidy` job failing won't block other PR CI jobs from completing, and so tidy failures
# shouldn't inhibit revealing other failures in PR CI jobs.
if [ "$PR_CI_JOB" == "1" ]; then
  echo "PR_CI_JOB set; skipping tidy"
  SKIP_TIDY="--skip tidy"
fi

../x.py --stage 2 test \
  ${SKIP_TIDY:+$SKIP_TIDY} \
  --skip tests \
  --skip coverage-map \
  --skip coverage-run \
  --skip library \
  --skip tidyselftest
---
##[endgroup]
Executing "/scripts/stage_2_test_set1.sh"
+ /scripts/stage_2_test_set1.sh
+ '[' 1 == 1 ']'
+ echo 'PR_CI_JOB set; skipping tidy'
+ SKIP_TIDY='--skip tidy'
+ ../x.py --stage 2 test --skip tidy --skip compiler --skip src
PR_CI_JOB set; skipping tidy
##[group]Building bootstrap
    Finished `dev` profile [unoptimized] target(s) in 0.04s
##[endgroup]
---
   --> /cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rand_core-0.9.3/src/lib.rs:322:50
    |
321 | #[derive(Debug, Eq, PartialEq, Hash)]
    |                 -- in this derive macro expansion
322 | pub struct UnwrapMut<'r, R: TryRngCore + ?Sized>(pub &'r mut R);
    |                      --                          ^^^^^^^^^^^^^ ...so that the type `R` will meet its required lifetime bounds
    |                      |
    |                      the parameter type `R` must be valid for the lifetime `'r` as defined here...
    |
   --> library/core/src/cmp.rs:364:0
    |
    = note: in this expansion of `#[derive(Eq)]`
help: consider adding an explicit lifetime bound
    |
321 | #[derive(Debug, Eq + 'r, PartialEq, Hash)]
    |                    ++++

For more information about this error, try `rustc --explain E0309`.
[RUSTC-TIMING] rand_core test:false 0.231
error: could not compile `rand_core` (lib) due to 1 previous error

</details>

KiChjang KiChjang commented on code on Mar 02, 2026 12:04 UTC
Code Review
tests/ui/deriving/deriving-all-codegen.stdout:1
@@ -226,11 +222,12 @@ impl ::core::cmp::PartialEq for PackedPoint {
     }
 }
 #[automatically_derived]
-impl ::core::cmp::Eq for PackedPoint {
-    #[inline]
+impl ::core::cmp::Eq for PackedPoint { }
+const {

This is the code that gets generated when I tell the compiler to emit a ast::ItemKind::ConstBlock:

https://github.com/rust-lang/rust/blob/8d50bccc5bd70be9f5a2fc98c0857e24b3dcdf85/compiler/rustc_ast/src/ast.rs#L3955-L3959

rust-log-analyzer rust-log-analyzer commented on Mar 02, 2026 13:33 UTC
Contributor

The job aarch64-gnu-llvm-20-1 failed! Check out the build log: (web) (plain enhanced) (plain)

<details><summary><i>Click to see the possible cause of the failure (guessed by this bot)</i></summary>

/dev/sda15       98M  6.4M   92M   7% /boot/efi
tmpfs           1.6G   16K  1.6G   1% /run/user/1001
================================================================================

Sufficient disk space available (120307420KB >= 52428800KB). Skipping cleanup.
##[group]Run echo "[CI_PR_NUMBER=$num]"
echo "[CI_PR_NUMBER=$num]"
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
---
set -ex

# Run a subset of tests. Used to run tests in parallel in multiple jobs.

# When this job partition is run as part of PR CI, skip tidy to allow revealing more failures. The
# dedicated `tidy` job failing won't block other PR CI jobs from completing, and so tidy failures
# shouldn't inhibit revealing other failures in PR CI jobs.
if [ "$PR_CI_JOB" == "1" ]; then
  echo "PR_CI_JOB set; skipping tidy"
  SKIP_TIDY="--skip tidy"
fi

../x.py --stage 2 test \
  ${SKIP_TIDY:+$SKIP_TIDY} \
  --skip compiler \
  --skip src
#!/bin/bash

set -ex

# Run a subset of tests. Used to run tests in parallel in multiple jobs.

# When this job partition is run as part of PR CI, skip tidy to allow revealing more failures. The
# dedicated `tidy` job failing won't block other PR CI jobs from completing, and so tidy failures
# shouldn't inhibit revealing other failures in PR CI jobs.
if [ "$PR_CI_JOB" == "1" ]; then
  echo "PR_CI_JOB set; skipping tidy"
  SKIP_TIDY="--skip tidy"
fi

../x.py --stage 2 test \
  ${SKIP_TIDY:+$SKIP_TIDY} \
  --skip tests \
  --skip coverage-map \
  --skip coverage-run \
  --skip library \
  --skip tidyselftest
---
##[endgroup]
Executing "/scripts/stage_2_test_set1.sh"
+ /scripts/stage_2_test_set1.sh
+ '[' 1 == 1 ']'
+ echo 'PR_CI_JOB set; skipping tidy'
+ SKIP_TIDY='--skip tidy'
+ ../x.py --stage 2 test --skip tidy --skip compiler --skip src
PR_CI_JOB set; skipping tidy
##[group]Building bootstrap
    Finished `dev` profile [unoptimized] target(s) in 0.04s
##[endgroup]
---
   Compiling regalloc2 v0.13.5
error[E0433]: cannot find `Self` in this scope
   --> /cargo/registry/src/index.crates.io-1949cf8c6b5b557f/regalloc2-0.13.5/src/lib.rs:222:18
    |
222 |     bits: [Bits; Self::LEN],
    |                  ^^^^ `Self` is only available in impls, traits, and type definitions

[RUSTC-TIMING] cranelift_codegen_meta test:false 4.664
   Compiling cranelift-codegen v0.128.3
[RUSTC-TIMING] arbitrary test:false 2.292
   Compiling cranelift-control v0.128.3

</details>

rust-log-analyzer rust-log-analyzer commented on Mar 02, 2026 15:04 UTC
Contributor

The job aarch64-gnu-llvm-20-1 failed! Check out the build log: (web) (plain enhanced) (plain)

<details><summary><i>Click to see the possible cause of the failure (guessed by this bot)</i></summary>

/dev/sda15       98M  6.4M   92M   7% /boot/efi
tmpfs           1.6G   16K  1.6G   1% /run/user/1001
================================================================================

Sufficient disk space available (120307364KB >= 52428800KB). Skipping cleanup.
##[group]Run echo "[CI_PR_NUMBER=$num]"
echo "[CI_PR_NUMBER=$num]"
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
---
set -ex

# Run a subset of tests. Used to run tests in parallel in multiple jobs.

# When this job partition is run as part of PR CI, skip tidy to allow revealing more failures. The
# dedicated `tidy` job failing won't block other PR CI jobs from completing, and so tidy failures
# shouldn't inhibit revealing other failures in PR CI jobs.
if [ "$PR_CI_JOB" == "1" ]; then
  echo "PR_CI_JOB set; skipping tidy"
  SKIP_TIDY="--skip tidy"
fi

../x.py --stage 2 test \
  ${SKIP_TIDY:+$SKIP_TIDY} \
  --skip compiler \
  --skip src
#!/bin/bash

set -ex

# Run a subset of tests. Used to run tests in parallel in multiple jobs.

# When this job partition is run as part of PR CI, skip tidy to allow revealing more failures. The
# dedicated `tidy` job failing won't block other PR CI jobs from completing, and so tidy failures
# shouldn't inhibit revealing other failures in PR CI jobs.
if [ "$PR_CI_JOB" == "1" ]; then
  echo "PR_CI_JOB set; skipping tidy"
  SKIP_TIDY="--skip tidy"
fi

../x.py --stage 2 test \
  ${SKIP_TIDY:+$SKIP_TIDY} \
  --skip tests \
  --skip coverage-map \
  --skip coverage-run \
  --skip library \
  --skip tidyselftest
---
Executing "/scripts/stage_2_test_set1.sh"
+ /scripts/stage_2_test_set1.sh
PR_CI_JOB set; skipping tidy
+ '[' 1 == 1 ']'
+ echo 'PR_CI_JOB set; skipping tidy'
+ SKIP_TIDY='--skip tidy'
+ ../x.py --stage 2 test --skip tidy --skip compiler --skip src
##[group]Building bootstrap
    Finished `dev` profile [unoptimized] target(s) in 0.04s
##[endgroup]
downloading https://static.rust-lang.org/dist/2026-01-21/rustfmt-nightly-aarch64-unknown-linux-gnu.tar.xz
---
test [ui] tests/ui/abi/abi-sysv64-register-usage.rs ... ignored, ignored when the architecture is aarch64
test [ui] tests/ui/abi/abi-typo-unstable.rs#feature_enabled ... ok
test [ui] tests/ui/abi/abi-typo-unstable.rs#feature_disabled ... ok
test [ui] tests/ui/abi/anon-extern-mod.rs ... ok
test [ui] tests/ui/abi/avr-sram.rs#disable_sram ... ok
test [ui] tests/ui/abi/arm-unadjusted-intrinsic.rs#aarch64 ... ok
test [ui] tests/ui/abi/avr-sram.rs#has_sram ... ok
test [ui] tests/ui/abi/avr-sram.rs#no_sram ... ok
test [ui] tests/ui/abi/arm-unadjusted-intrinsic.rs#arm ... ok
test [ui] tests/ui/abi/bad-custom.rs ... ok
test [ui] tests/ui/abi/c-stack-as-value.rs ... ok
test [ui] tests/ui/abi/c-zst.rs#aarch64-darwin ... ok
test [ui] tests/ui/abi/c-zst.rs#powerpc-linux ... ok
---
test [ui] tests/ui/asm/aarch64/ttbr0_el2.rs ... ok
test [ui] tests/ui/asm/aarch64/type-check-2.rs ... ok
test [ui] tests/ui/asm/aarch64/type-check-3.rs ... ok
test [ui] tests/ui/asm/aarch64/type-f16.rs ... ok
test [ui] tests/ui/asm/aarch64v8r.rs#hf ... ok
test [ui] tests/ui/asm/aarch64v8r.rs#r82 ... ok
test [ui] tests/ui/asm/aarch64/sym.rs ... ok
test [ui] tests/ui/asm/aarch64v8r.rs#sf ... ok
test [ui] tests/ui/asm/arm-low-dreg.rs ... ok
test [ui] tests/ui/asm/binary_asm_labels.rs ... ignored, only executed when the architecture is x86_64
test [ui] tests/ui/asm/asm-with-nested-closure.rs ... ok
test [ui] tests/ui/asm/cfg-parse-error.rs ... ok
test [ui] tests/ui/asm/bad-template.rs#aarch64 ... ok
---
test [ui] tests/ui/const-generics/occurs-check/unused-substs-3.rs ... ok
test [ui] tests/ui/const-generics/occurs-check/unused-substs-4.rs ... ok
test [ui] tests/ui/const-generics/ogca/basic-fail.rs ... ok
test [ui] tests/ui/const-generics/occurs-check/unused-substs-5.rs ... ok
test [ui] tests/ui/const-generics/ogca/basic.rs ... ok
test [ui] tests/ui/const-generics/ogca/rhs-but-not-root.rs ... ok
test [ui] tests/ui/const-generics/ogca/generic-param-rhs.rs ... ok
test [ui] tests/ui/const-generics/ogca/coherence-ambiguous.rs ... ok
test [ui] tests/ui/const-generics/opaque_types.rs ... ok
test [ui] tests/ui/const-generics/outer-lifetime-in-const-generic-default.rs ... ok
test [ui] tests/ui/const-generics/overlapping_impls.rs ... ok
test [ui] tests/ui/const-generics/opaque_types2.rs ... ok
test [ui] tests/ui/const-generics/params-in-ct-in-ty-param-lazy-norm.rs#min ... ok
---
test [ui] tests/ui/extern/issue-64655-extern-rust-must-allow-unwind.rs#fat3 ... ok
test [ui] tests/ui/extern/issue-80074.rs ... ok
test [ui] tests/ui/extern/issue-95829.rs ... ok
test [ui] tests/ui/extern/issue-64655-extern-rust-must-allow-unwind.rs#thin1 ... ok
test [ui] tests/ui/extern/lgamma-linkage.rs ... ok
test [ui] tests/ui/extern/not-in-block.rs ... ok
test [ui] tests/ui/extern/unsized-extern-derefmove.rs ... ok
test [ui] tests/ui/extern/no-mangle-associated-fn.rs ... ok
test [ui] tests/ui/feature-gates/allow-features-empty.rs ... ok
test [ui] tests/ui/extern/windows-tcb-trash-13259.rs ... ok
---
test [ui] tests/ui/feature-gates/feature-gate-macro-derive.rs ... ok
test [ui] tests/ui/feature-gates/feature-gate-loop-match.rs ... ok
test [ui] tests/ui/feature-gates/feature-gate-macro-metavar-expr-concat.rs ... ok
test [ui] tests/ui/feature-gates/feature-gate-marker_trait_attr.rs ... ok
test [ui] tests/ui/feature-gates/feature-gate-mgca-type-const-syntax.rs ... ok
test [ui] tests/ui/feature-gates/feature-gate-may-dangle.rs ... ok
test [ui] tests/ui/feature-gates/feature-gate-min-generic-const-args.rs ... ok
test [ui] tests/ui/feature-gates/feature-gate-movrs_target_feature.rs ... ignored, only executed when the architecture is x86_64
test [ui] tests/ui/feature-gates/feature-gate-min_const_fn.rs ... ok
test [ui] tests/ui/feature-gates/feature-gate-more-qualified-paths.rs ... ok
---
test [ui] tests/ui/imports/ambiguous-9.rs ... ok
test [ui] tests/ui/imports/ambiguous-import-visibility-module.rs ... ok
test [ui] tests/ui/imports/ambiguous-8.rs ... ok
test [ui] tests/ui/imports/ambiguous-glob-vs-expanded-extern.rs ... ok
test [ui] tests/ui/imports/ambiguous-panic-glob-vs-multiouter.rs ... ok
test [ui] tests/ui/imports/ambiguous-panic-globvsglob.rs ... ok
test [ui] tests/ui/imports/ambiguous-panic-no-implicit-prelude.rs ... ok
test [ui] tests/ui/imports/ambiguous-panic-non-prelude-core-glob.rs ... ok
test [ui] tests/ui/imports/ambiguous-panic-non-prelude-std-glob.rs ... ok
test [ui] tests/ui/imports/ambiguous-panic-pick-core.rs ... ok
test [ui] tests/ui/imports/ambiguous-panic-pick-std.rs ... ok
---
test [ui] tests/ui/layout/post-mono-layout-cycle.rs ... ok
test [ui] tests/ui/layout/randomize.rs#normal ... ok
test [ui] tests/ui/layout/randomize.rs#randomize-layout ... ok
test [ui] tests/ui/layout/null-pointer-optimization.rs ... ok
test [ui] tests/ui/layout/rigid-alias-due-to-broken-impl.rs ... ok
test [ui] tests/ui/layout/size-of-val-raw-too-big.rs ... ignored, only executed when the pointer width is 32bit (Layout computation rejects this layout for different reasons on 64-bit.)
test [ui] tests/ui/layout/reprc-power-alignment.rs ... ok
test [ui] tests/ui/layout/struct.rs ... ok
test [ui] tests/ui/layout/rigid-alias-no-params.rs ... ok
test [ui] tests/ui/layout/rust-call-abi-not-a-tuple-ice-81974.rs ... ok
---
+    |                            in this derive macro expansion
103 LL | struct Bar<T>(T);
-    |        ^^^ - type parameter would need to implement `Eq`
+    |        ^^^
105    = help: consider manually implementing `Eq` to avoid undesired bounds
106    = note: 1 redundant requirement hidden
107    = note: required for `&'static Bar<dyn Debug>` to implement `Eq`


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 const-generics/adt_const_params/unsizing-wfcheck-issue-126272.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/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/const-generics/adt_const_params/unsizing-wfcheck-issue-126272.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/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--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/aarch64-unknown-linux-gnu/test/ui/const-generics/adt_const_params/unsizing-wfcheck-issue-126272" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error[E0277]: the size for values of type `(dyn Debug + 'static)` cannot be known at compilation time
##[error]  --> /checkout/tests/ui/const-generics/adt_const_params/unsizing-wfcheck-issue-126272.rs:11:13
   |
LL |     nested: &'static Bar<dyn std::fmt::Debug>,
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
   |
   = help: the trait `Sized` is not implemented for `(dyn Debug + 'static)`
note: required by an implicit `Sized` bound in `Bar`
  --> /checkout/tests/ui/const-generics/adt_const_params/unsizing-wfcheck-issue-126272.rs:20:12
   |
LL | struct Bar<T>(T);
   |            ^ required by the implicit `Sized` requirement on this type parameter in `Bar`
help: you could relax the implicit `Sized` bound on `T` if it were used through indirection like `&T` or `Box<T>`
  --> /checkout/tests/ui/const-generics/adt_const_params/unsizing-wfcheck-issue-126272.rs:20:12
   |
LL | struct Bar<T>(T);
   |            ^  - ...if indirection were used here: `Box<T>`
   |            |
   |            this could be changed to `T: ?Sized`...

error[E0204]: the trait `ConstParamTy_` cannot be implemented for this type
##[error]  --> /checkout/tests/ui/const-generics/adt_const_params/unsizing-wfcheck-issue-126272.rs:9:8
   |
LL | #[derive(Debug, PartialEq, Eq, ConstParamTy)]
   |                                ------------ in this derive macro expansion
LL | struct Foo {
   |        ^^^
LL | //~^ ERROR the trait `ConstParamTy_`
LL |     nested: &'static Bar<dyn std::fmt::Debug>,
   |     ----------------------------------------- this field does not implement `ConstParamTy_`
   |
note: the `ConstParamTy_` impl for `&'static Bar<(dyn Debug + 'static)>` requires that `(dyn Debug + 'static): ConstParamTy_`
  --> /checkout/tests/ui/const-generics/adt_const_params/unsizing-wfcheck-issue-126272.rs:11:13
   |
LL |     nested: &'static Bar<dyn std::fmt::Debug>,
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: the `ConstParamTy_` impl for `&'static Bar<(dyn Debug + 'static)>` requires that `(dyn Debug + 'static): Eq`
  --> /checkout/tests/ui/const-generics/adt_const_params/unsizing-wfcheck-issue-126272.rs:11:13
   |
LL |     nested: &'static Bar<dyn std::fmt::Debug>,
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: the `ConstParamTy_` impl for `&'static Bar<(dyn Debug + 'static)>` requires that `(dyn Debug + 'static): Sized`
  --> /checkout/tests/ui/const-generics/adt_const_params/unsizing-wfcheck-issue-126272.rs:11:13
   |
LL |     nested: &'static Bar<dyn std::fmt::Debug>,
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0277]: the size for values of type `(dyn Debug + 'static)` cannot be known at compilation time
##[error]  --> /checkout/tests/ui/const-generics/adt_const_params/unsizing-wfcheck-issue-126272.rs:11:5
   |
LL | #[derive(Debug, PartialEq, Eq, ConstParamTy)]
   |          ----- in this derive macro expansion
...
LL |     nested: &'static Bar<dyn std::fmt::Debug>,
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
   |
   = help: the trait `Sized` is not implemented for `(dyn Debug + 'static)`
help: the trait `Debug` is implemented for `Bar<T>`
  --> /checkout/tests/ui/const-generics/adt_const_params/unsizing-wfcheck-issue-126272.rs:19:10
   |
LL | #[derive(Debug, PartialEq, Eq, ConstParamTy)]
   |          ^^^^^
note: required for `Bar<(dyn Debug + 'static)>` to implement `Debug`
  --> /checkout/tests/ui/const-generics/adt_const_params/unsizing-wfcheck-issue-126272.rs:20:8
   |
LL | #[derive(Debug, PartialEq, Eq, ConstParamTy)]
   |          ----- in this derive macro expansion
LL | struct Bar<T>(T);
   |        ^^^ - unsatisfied trait bound
   = help: consider manually implementing `Debug` to avoid undesired bounds
   = note: 2 redundant requirements hidden
   = note: required for `&&'static Bar<(dyn Debug + 'static)>` to implement `Debug`
   = note: required for the cast from `&&&'static Bar<(dyn Debug + 'static)>` to `&dyn Debug`

error[E0369]: binary operation `==` cannot be applied to type `&Bar<dyn Debug>`
##[error]  --> /checkout/tests/ui/const-generics/adt_const_params/unsizing-wfcheck-issue-126272.rs:11:5
   |
LL | #[derive(Debug, PartialEq, Eq, ConstParamTy)]
   |                 --------- in this derive macro expansion
...
LL |     nested: &'static Bar<dyn std::fmt::Debug>,
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0277]: the trait bound `dyn Debug: Eq` is not satisfied
##[error]  --> /checkout/tests/ui/const-generics/adt_const_params/unsizing-wfcheck-issue-126272.rs:11:5
   |
LL | #[derive(Debug, PartialEq, Eq, ConstParamTy)]
   |                            -- in this derive macro expansion
...
LL |     nested: &'static Bar<dyn std::fmt::Debug>,
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Eq` is not implemented for `dyn Debug`
   |
help: the trait `Eq` is implemented for `Bar<T>`
  --> /checkout/tests/ui/const-generics/adt_const_params/unsizing-wfcheck-issue-126272.rs:19:28
   |
LL | #[derive(Debug, PartialEq, Eq, ConstParamTy)]
   |                            ^^
note: required for `Bar<dyn Debug>` to implement `Eq`
  --> /checkout/tests/ui/const-generics/adt_const_params/unsizing-wfcheck-issue-126272.rs:20:8
   |
LL | #[derive(Debug, PartialEq, Eq, ConstParamTy)]
   |                            --
   |                            |
   |                            type parameter would need to implement `Eq`
   |                            in this derive macro expansion
LL | struct Bar<T>(T);
   |        ^^^
   = help: consider manually implementing `Eq` to avoid undesired bounds
   = note: 1 redundant requirement hidden
   = note: required for `&'static Bar<dyn Debug>` to implement `Eq`
note: required by a bound in `std::cmp::AssertParamIsEq`
  --> /rustc/FAKE_PREFIX/library/core/src/cmp.rs:379:0

error[E0277]: the size for values of type `dyn Debug` cannot be known at compilation time
##[error]  --> /checkout/tests/ui/const-generics/adt_const_params/unsizing-wfcheck-issue-126272.rs:11:5
   |
LL | #[derive(Debug, PartialEq, Eq, ConstParamTy)]
   |                            -- in this derive macro expansion
...
LL |     nested: &'static Bar<dyn std::fmt::Debug>,
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
   |
   = help: the trait `Sized` is not implemented for `dyn Debug`
note: required by an implicit `Sized` bound in `Bar`
  --> /checkout/tests/ui/const-generics/adt_const_params/unsizing-wfcheck-issue-126272.rs:20:12
   |
LL | struct Bar<T>(T);
   |            ^ required by the implicit `Sized` requirement on this type parameter in `Bar`
help: you could relax the implicit `Sized` bound on `T` if it were used through indirection like `&T` or `Box<T>`
  --> /checkout/tests/ui/const-generics/adt_const_params/unsizing-wfcheck-issue-126272.rs:20:12
   |
LL | struct Bar<T>(T);
   |            ^  - ...if indirection were used here: `Box<T>`
   |            |
   |            this could be changed to `T: ?Sized`...

error[E0277]: the size for values of type `(dyn Debug + 'static)` cannot be known at compilation time
##[error]  --> /checkout/tests/ui/const-generics/adt_const_params/unsizing-wfcheck-issue-126272.rs:25:33
   |
LL |     let x: Test<{ Foo { nested: &Bar(4) } }> = Test;
   |                                 ^^^^^^^ doesn't have a size known at compile-time
   |
   = help: the trait `Sized` is not implemented for `(dyn Debug + 'static)`
note: required by an implicit `Sized` bound in `Bar`
  --> /checkout/tests/ui/const-generics/adt_const_params/unsizing-wfcheck-issue-126272.rs:20:12
   |
LL | struct Bar<T>(T);
   |            ^ required by the implicit `Sized` requirement on this type parameter in `Bar`
help: you could relax the implicit `Sized` bound on `T` if it were used through indirection like `&T` or `Box<T>`
  --> /checkout/tests/ui/const-generics/adt_const_params/unsizing-wfcheck-issue-126272.rs:20:12
   |
LL | struct Bar<T>(T);
   |            ^  - ...if indirection were used here: `Box<T>`
   |            |
   |            this could be changed to `T: ?Sized`...

error: aborting due to 7 previous errors

---
23 
24 error[E0107]: struct takes 0 generic arguments but 1 generic argument was supplied
+   --> $DIR/multiple-types-with-same-name-and-derive.rs:12:8
+    |
+ LL | struct NotSM<T>(T);
+    |        ^^^^^ expected 0 generic arguments
+    |
+ note: struct defined here, with 0 generic parameters
+   --> $DIR/multiple-types-with-same-name-and-derive.rs:8:8
+    |
+ LL | struct NotSM;
+    |        ^^^^^
+    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+ 
+ error[E0107]: struct takes 0 generic arguments but 1 generic argument was supplied
25   --> $DIR/multiple-types-with-same-name-and-derive.rs:10:10
26    |
27 LL | #[derive(PartialEq, Eq)]

65 LL | struct NotSM<T>(T);
66    |                 ^ unknown field
67 
- error: aborting due to 6 previous errors
+ error: aborting due to 7 previous errors
69 
---
-   --> /checkout/tests/ui/duplicate/multiple-types-with-same-name-and-derive.rs:12:8
-   --> /checkout/tests/ui/duplicate/multiple-types-with-same-name-and-derive.rs:8:8
+   --> $DIR/multiple-types-with-same-name-and-derive.rs:12:8
+    |
+ LL | struct NotSM<T>(T);
+    |        ^^^^^ expected 0 generic arguments
+    |
+ note: struct defined here, with 0 generic parameters
+   --> $DIR/multiple-types-with-same-name-and-derive.rs:8:8
+    |
+ LL | struct NotSM;
+    |        ^^^^^
+    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+ 
+ error[E0107]: struct takes 0 generic arguments but 1 generic argument was supplied
+ error: aborting due to 7 previous errors


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 duplicate/multiple-types-with-same-name-and-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/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/duplicate/multiple-types-with-same-name-and-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/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--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/aarch64-unknown-linux-gnu/test/ui/duplicate/multiple-types-with-same-name-and-derive" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error[E0428]: the name `NotSM` is defined multiple times
##[error]  --> /checkout/tests/ui/duplicate/multiple-types-with-same-name-and-derive.rs:12:1
   |
LL | struct NotSM;
   | ------------- previous definition of the type `NotSM` here
...
LL | struct NotSM<T>(T);
   | ^^^^^^^^^^^^^^^^^^^ `NotSM` redefined here
   |
   = note: `NotSM` must be defined only once in the type namespace of this module

error[E0107]: struct takes 0 generic arguments but 1 generic argument was supplied
##[error]  --> /checkout/tests/ui/duplicate/multiple-types-with-same-name-and-derive.rs:12:8
   |
LL | struct NotSM<T>(T);
   |        ^^^^^ expected 0 generic arguments
   |
note: struct defined here, with 0 generic parameters
  --> /checkout/tests/ui/duplicate/multiple-types-with-same-name-and-derive.rs:8:8
   |
LL | struct NotSM;
   |        ^^^^^

error[E0107]: struct takes 0 generic arguments but 1 generic argument was supplied
##[error]  --> /checkout/tests/ui/duplicate/multiple-types-with-same-name-and-derive.rs:12:8
   |
LL | struct NotSM<T>(T);
   |        ^^^^^ expected 0 generic arguments
   |
note: struct defined here, with 0 generic parameters
  --> /checkout/tests/ui/duplicate/multiple-types-with-same-name-and-derive.rs:8:8
   |
LL | struct NotSM;
   |        ^^^^^
   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`

error[E0107]: struct takes 0 generic arguments but 1 generic argument was supplied
##[error]  --> /checkout/tests/ui/duplicate/multiple-types-with-same-name-and-derive.rs:10:10
   |
LL | #[derive(PartialEq, Eq)]
---

error[E0107]: struct takes 0 generic arguments but 1 generic argument was supplied
##[error]  --> /checkout/tests/ui/duplicate/multiple-types-with-same-name-and-derive.rs:12:8
   |
LL | struct NotSM<T>(T);
   |        ^^^^^ expected 0 generic arguments
   |
note: struct defined here, with 0 generic parameters
  --> /checkout/tests/ui/duplicate/multiple-types-with-same-name-and-derive.rs:8:8
   |
LL | struct NotSM;
   |        ^^^^^
   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`

error[E0107]: struct takes 0 generic arguments but 1 generic argument was supplied
##[error]  --> /checkout/tests/ui/duplicate/multiple-types-with-same-name-and-derive.rs:12:8
   |
LL | struct NotSM<T>(T);
   |        ^^^^^ expected 0 generic arguments
   |
note: struct defined here, with 0 generic parameters
  --> /checkout/tests/ui/duplicate/multiple-types-with-same-name-and-derive.rs:8:8
   |
LL | struct NotSM;
   |        ^^^^^
   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`

error[E0609]: no field `0` on type `&NotSM`
##[error]  --> /checkout/tests/ui/duplicate/multiple-types-with-same-name-and-derive.rs:12:17
   |
LL | struct NotSM<T>(T);
   |                 ^ unknown field

error: aborting due to 7 previous errors

Some errors have detailed explanations: E0107, E0428, E0609.
---
---- [ui] tests/ui/stats/macro-stats.rs stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/stats/macro-stats/macro-stats.stderr`
diff of stderr:

8 macro-stats q!                                    1         26       26.0        519      519.0
9 macro-stats #[derive(Ord)]                        1         15       15.0        503      503.0
10 macro-stats #[derive(Default)]                    2         16        8.0        403      201.5
- macro-stats #[derive(Eq)]                         1         12       12.0        323      323.0
+ macro-stats #[derive(Eq)]                         1         12       12.0        335      335.0
12 macro-stats #[derive(Debug)]                      1          8        8.0        277      277.0
13 macro-stats #[derive(PartialEq)]                  1          9        9.0        267      267.0
14 macro-stats #[derive(Copy)]                       1          2        2.0         61       61.0


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 stats/macro-stats.rs`

error: 1 errors occurred comparing output.
status: exit status: 0
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/stats/macro-stats.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/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--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/aarch64-unknown-linux-gnu/test/ui/stats/macro-stats" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "-Zmacro-stats"
stdout: none
--- stderr -------------------------------
macro-stats ===================================================================================
macro-stats MACRO EXPANSION STATS: macro_stats
macro-stats Macro Name                         Uses      Lines  Avg Lines      Bytes  Avg Bytes
macro-stats -----------------------------------------------------------------------------------
macro-stats #[derive(Clone)]                      8         67        8.4      1_879      234.9
macro-stats #[derive(PartialOrd)]                 1         17       17.0        675      675.0
macro-stats #[derive(Hash)]                       2         17        8.5        565      282.5
macro-stats q!                                    1         26       26.0        519      519.0
macro-stats #[derive(Ord)]                        1         15       15.0        503      503.0
macro-stats #[derive(Default)]                    2         16        8.0        403      201.5
macro-stats #[derive(Eq)]                         1         12       12.0        335      335.0
macro-stats #[derive(Debug)]                      1          8        8.0        277      277.0
macro-stats #[derive(PartialEq)]                  1          9        9.0        267      267.0
macro-stats #[derive(Copy)]                       1          2        2.0         61       61.0
macro-stats p!                                    1          3        3.0         32       32.0
macro-stats trait_impl_tys!                       1          2        2.0         28       28.0
macro-stats foreign_item!                         1          1        1.0         21       21.0
macro-stats long_name_that_doesnt_fit_on_one_line!
macro-stats                                       1          1        1.0         18       18.0
macro-stats impl_const!                           1          1        1.0         17       17.0
macro-stats trait_tys!                            1          2        2.0         15       15.0
macro-stats n99!                                  2          2        1.0          4        2.0
macro-stats none!                                 1          1        1.0          4        4.0
macro-stats u32!                                  1          1        1.0          3        3.0
macro-stats long_name_that_fits_on_one_line!     10         10        1.0          0        0.0
macro-stats long_name_that_fits_on_one_line_____! 1          1        1.0          0        0.0
macro-stats long_name_that_fits_on_one_line____!  1          1        1.0          0        0.0
macro-stats long_name_that_fits_on_one_line___!   1          1        1.0          0        0.0
macro-stats long_name_that_fits_on_one_line__!    1          1        1.0          0        0.0
macro-stats long_name_that_fits_on_one_line_!     1          1        1.0          0        0.0
macro-stats #[test]                               1          1        1.0          0        0.0
macro-stats ===================================================================================
------------------------------------------

---- [ui] tests/ui/stats/macro-stats.rs stdout end ----

failures:

</details>

nnethercote nnethercote commented on code on Mar 07, 2026 05:49 UTC
Code Review
tests/ui/deriving/deriving-all-codegen.stdout:1
@@ -226,11 +222,12 @@ impl ::core::cmp::PartialEq for PackedPoint {
     }
 }
 #[automatically_derived]
-impl ::core::cmp::Eq for PackedPoint {
-    #[inline]
+impl ::core::cmp::Eq for PackedPoint { }
+const {

Weird. Maybe a pretty printing issue? Would be good to understand what's happening here.

nnethercote nnethercote commented on code on Mar 07, 2026 05:50 UTC
Code Review
compiler/rustc_builtin_macros/src/deriving/cmp/eq.rs:1
@@ -1,13 +1,112 @@
+use rustc_ast::mut_visit::{self, MutVisitor};
 use rustc_ast::{self as ast, MetaItem, Safety};
 use rustc_data_structures::fx::FxHashSet;
 use rustc_expand::base::{Annotatable, ExtCtxt};
-use rustc_span::{Span, sym};
+use rustc_span::{Ident, Span, kw, sym};
 use thin_vec::{ThinVec, thin_vec};
 
-use crate::deriving::generic::ty::*;
 use crate::deriving::generic::*;
 use crate::deriving::path_std;
 
+struct ReplaceSelfTyVisitor(Box<ast::Ty>);
+impl MutVisitor for ReplaceSelfTyVisitor {
+    fn visit_ty(&mut self, ty: &mut ast::Ty) {
+        if let ast::TyKind::Path(None, path) = &mut ty.kind
+            && let [first, rest @ ..] = &path.segments[..]
+            && *first == kw::SelfUpper
+        {
+            if rest.is_empty() {
+                // Just `Self` — replace the whole type
+                *ty = *self.0.clone();
+            } else {
+                // `Self::Something` — splice concrete type's segments in
+                let ast::TyKind::Path(_, concrete_path) = &self.0.kind else {
+                    unreachable!("expected Self type to be a path");
+                };
+                let mut new_segments = concrete_path.segments.clone();
+                new_segments.extend_from_slice(rest);
+                path.segments = new_segments;
+                mut_visit::walk_ty(self, ty);
+            }
+        } else {
+            mut_visit::walk_ty(self, ty);
+        }
+    }
+    fn visit_expr(&mut self, expr: &mut ast::Expr) {

Please put blank lines between the methods, here and elsewhere.

nnethercote nnethercote commented on code on Mar 07, 2026 05:51 UTC
Code Review
compiler/rustc_builtin_macros/src/deriving/cmp/eq.rs:1
@@ -1,13 +1,112 @@
+use rustc_ast::mut_visit::{self, MutVisitor};
 use rustc_ast::{self as ast, MetaItem, Safety};
 use rustc_data_structures::fx::FxHashSet;
 use rustc_expand::base::{Annotatable, ExtCtxt};
-use rustc_span::{Span, sym};
+use rustc_span::{Ident, Span, kw, sym};
 use thin_vec::{ThinVec, thin_vec};
 
-use crate::deriving::generic::ty::*;
 use crate::deriving::generic::*;
 use crate::deriving::path_std;
 
+struct ReplaceSelfTyVisitor(Box<ast::Ty>);

Blank line after the struct, and likewise below.

nnethercote nnethercote commented on code on Mar 07, 2026 05:55 UTC
Code Review
compiler/rustc_builtin_macros/src/deriving/cmp/eq.rs:1
@@ -1,13 +1,112 @@
+use rustc_ast::mut_visit::{self, MutVisitor};
 use rustc_ast::{self as ast, MetaItem, Safety};
 use rustc_data_structures::fx::FxHashSet;
 use rustc_expand::base::{Annotatable, ExtCtxt};
-use rustc_span::{Span, sym};
+use rustc_span::{Ident, Span, kw, sym};
 use thin_vec::{ThinVec, thin_vec};
 
-use crate::deriving::generic::ty::*;
 use crate::deriving::generic::*;
 use crate::deriving::path_std;
 
+struct ReplaceSelfTyVisitor(Box<ast::Ty>);

Also, the three visitors need a brief comment explaining what they are doing and why.

nnethercote nnethercote commented on code on Mar 07, 2026 05:57 UTC
Code Review
compiler/rustc_builtin_macros/src/deriving/cmp/eq.rs:1
@@ -18,45 +117,131 @@ pub(crate) fn expand_deriving_eq(
 ) {
     let span = cx.with_def_site_ctxt(span);
 
+    let mut fn_generics = ast::Generics { span, ..Default::default() };
+    let mut self_ty = None;
+
     let trait_def = TraitDef {
         span,
         path: path_std!(cmp::Eq),
         skip_path_as_bound: false,
         needs_copy_as_bound_if_packed: true,
         additional_bounds: Vec::new(),
         supports_unions: true,
-        methods: vec![MethodDef {
-            name: sym::assert_fields_are_eq,
-            generics: Bounds::empty(),
-            explicit_self: true,
-            nonself_args: vec![],
-            ret_ty: Unit,
-            attributes: thin_vec![
-                // This method will never be called, so doing codegen etc. for it is unnecessary.
-                // We prevent this by adding `#[inline]`, which improves compile-time.
-                cx.attr_word(sym::inline, span),
-                cx.attr_nested_word(sym::doc, sym::hidden, span),
-                cx.attr_nested_word(sym::coverage, sym::off, span),
-            ],
-            fieldless_variants_strategy: FieldlessVariantsStrategy::Unify,
-            combine_substructure: combine_substructure(Box::new(|a, b, c| {
-                cs_total_eq_assert(a, b, c)
-            })),
-        }],
+        methods: Vec::new(),
         associated_types: Vec::new(),
         is_const,
         is_staged_api_crate: cx.ecfg.features.staged_api(),
         safety: Safety::Default,
         document: true,
     };
-    trait_def.expand_ext(cx, mitem, item, push, true)
+    trait_def.expand_ext(
+        cx,
+        mitem,
+        item,
+        &mut |mut a| {
+            let Annotatable::Item(item) = &mut a else {
+                unreachable!("should have emitted an Item in trait_def.expand_ext");
+            };
+            let ast::ItemKind::Impl(imp) = &mut item.kind else {
+                unreachable!("should have emitted an Impl in trait_def.expand_ext");
+            };
+            use ast::mut_visit::MutVisitor;
+            RespanGenericsVisitor(span).visit_generics(&mut imp.generics);
+            fn_generics = imp.generics.clone();
+            self_ty = Some(imp.self_ty.clone());
+            push(a)
+        },
+        true,
+    );
+
+    let self_ty =
+        self_ty.unwrap_or_else(|| cx.dcx().span_bug(span, "missing self type in `derive(Eq)`"));
+    let assert_stmts =
+        eq_assert_stmts_from_item(cx, span, item, ReplaceSelfTyVisitor(self_ty.clone()));
+
+    // Skip generating `assert_fields_are_eq` impl if there are no assertions to make
+    if assert_stmts.is_empty() {
+        return;
+    }
+
+    StripConstTraitBoundsVisitor.visit_generics(&mut fn_generics);
+    push(Annotatable::Item(expand_const_item_block(cx, span, fn_generics, self_ty, assert_stmts)));
+}
+
+fn expand_const_item_block(
+    cx: &ExtCtxt<'_>,
+    span: Span,
+    fn_generics: ast::Generics,
+    self_ty: Box<ast::Ty>,
+    assert_stmts: ThinVec<ast::Stmt>,
+) -> Box<ast::Item> {
+    // We need a dummy const pointer to Self argument to ensure well-formedness of the Self type.
+    // This doesn't add overhead because the fn itself is never called, and in fact should not
+    // even have any runtime code generated for it as it's an inline const fn.
+    let const_self_ptr_ty =
+        cx.ty(span, ast::TyKind::Ptr(ast::MutTy { mutbl: ast::Mutability::Not, ty: self_ty }));
+    let fn_args = thin_vec![cx.param(span, Ident::new(kw::Underscore, span), const_self_ptr_ty)];
+    let fn_sig = ast::FnSig {
+        header: ast::FnHeader {
+            constness: ast::Const::Yes(span),
+            coroutine_kind: None,
+            safety: ast::Safety::Default,
+            ext: ast::Extern::None,
+        },
+        decl: cx.fn_decl(fn_args, ast::FnRetTy::Default(span)),
+        span,
+    };
+
+    cx.item(

A brief example of the kind of code being generated would be helpful here.

nnethercote nnethercote commented on code on Mar 07, 2026 06:02 UTC
Code Review
tests/ui/deriving/deriving-all-codegen.stdout:1
@@ -138,11 +133,12 @@ impl ::core::cmp::PartialEq for Point {
     }
 }
 #[automatically_derived]
-impl ::core::cmp::Eq for Point {
-    #[inline]
+impl ::core::cmp::Eq for Point { }
+const {
     #[doc(hidden)]
     #[coverage(off)]
-    fn assert_fields_are_eq(&self) {
+    #[inline]
+    const fn assert_fields_are_eq(_: *const Point) {

I assume the parameter to assert_fields_are_eq is necessary in the generic case to make the trait bounds work? But could the parameter be avoided for non-generic functions like this one?

nnethercote nnethercote commented on code on Mar 07, 2026 06:08 UTC
Code Review
tests/ui/deriving/deriving-all-codegen.stdout:1
@@ -138,11 +133,12 @@ impl ::core::cmp::PartialEq for Point {
     }
 }
 #[automatically_derived]
-impl ::core::cmp::Eq for Point {
-    #[inline]
+impl ::core::cmp::Eq for Point { }
+const {
     #[doc(hidden)]
     #[coverage(off)]
-    fn assert_fields_are_eq(&self) {
+    #[inline]
+    const fn assert_fields_are_eq(_: *const Point) {

Also, why is the parameter (when present) *const T? Could it just be T?

madsmtm madsmtm commented on code on Mar 09, 2026 14:49 UTC
Code Review
tests/ui/deriving/deriving-all-codegen.stdout:1
@@ -138,11 +133,12 @@ impl ::core::cmp::PartialEq for Point {
     }
 }
 #[automatically_derived]
-impl ::core::cmp::Eq for Point {
-    #[inline]
+impl ::core::cmp::Eq for Point { }
+const {
     #[doc(hidden)]
     #[coverage(off)]
-    fn assert_fields_are_eq(&self) {
+    #[inline]
+    const fn assert_fields_are_eq(_: *const Point) {

Also, why is the parameter (when present) *const T? Could it just be T?

Probably to work with ?Sized types?

madsmtm madsmtm commented on code on Mar 09, 2026 14:53 UTC
Code Review
tests/ui/deriving/deriving-all-codegen.rs:1
@@ -128,6 +136,14 @@ struct Generic<T: Trait, U> {
 #[repr(packed)]
 struct PackedGeneric<T: Trait, U>(T, T::A, U);
 
+// A struct with a field referencing an associated constant.
+#[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
+struct AssociatedConst([u8; Self::LEN]);
+
+impl AssociatedConst {
+    const LEN: usize = 10;
+}
+
 // An empty enum.

Please add a test case like this:

macro_rules! get_self {
    () => {
        Self
    };
}

#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
struct SelfFromMacro {
    this: Option<Box<get_self!()>>
}

(I'm commenting this specifically because I think that any solution that matches on the token Self isn't gonna work).

madsmtm madsmtm commented on Mar 09, 2026 14:57 UTC
Reviewer

Another option to make it work properly with Self, while not doing an inherent method:

Add an extra trait with the method on it instead.

// `#[doc(hidden)]` trait (and unstable if we can?)
impl ::core::cmp::EqHelperTrait for $ty {
    #[inline]
    fn assert_fields_are_eq() {
        let _: ::core::cmp::AssertParamIsEq<$param1>;
        let _: ::core::cmp::AssertParamIsEq<$param2>;
        // ...
    }
}

View changes since this review

nnethercote nnethercote commented on Mar 09, 2026 23:47 UTC
Contributor

Another option to make it work properly with Self, while not doing an inherent method:

> Add an extra trait with the method on it instead.

The whole point of this PR is to eliminate a hidden name. Let's not introduce a new hidden name, even if it is unstable.

madsmtm madsmtm commented on Mar 10, 2026 11:05 UTC
Contributor

> Another option to make it work properly with Self, while not doing an inherent method:

> Add an extra trait with the method on it instead.

> The whole point of this PR is to eliminate a hidden name. Let's not introduce a new hidden name, even if it is unstable.

Idk., I think there's a difference between a hidden name on Eq, and a hidden type somewhere else. But I agree that if we can find some other solution, then that's preferable.

<details><summary>Details</summary>
<p>

Ideally we'd be able to do this:

struct Foo;
impl Foo {
    const _: () = {
        // reference `Self` here.
    };
}

But that's probably a bit far off, see https://github.com/rust-lang/rfcs/pull/3527.

</p>
</details>

KiChjang KiChjang commented on code on Mar 11, 2026 09:21 UTC
Code Review
tests/ui/deriving/deriving-all-codegen.stdout:1
@@ -226,11 +222,12 @@ impl ::core::cmp::PartialEq for PackedPoint {
     }
 }
 #[automatically_derived]
-impl ::core::cmp::Eq for PackedPoint {
-    #[inline]
+impl ::core::cmp::Eq for PackedPoint { }
+const {

Hmm, so it's apparently a feature gated behind const_block_items in https://github.com/rust-lang/rust/issues/149226. I'm also curious as to why it's necessary to generate a new ItemKind specifically for it when it's equivalent to const _: () = const { ... } in all cases and purposes. Will change to use the const item instead.

Reviewers
Assignees
KiChjang KiChjang
Labels
risk: low confidence: 88.7% reviewed
Vouch Risk Breakdown
AI-powered review risk analysis
Change Risk
Change Risk · Model 1 (XGBoost)
Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
Score: 58.7% (MEDIUM) · Higher = larger blast radius
58.7%
Review Confidence
Review Confidence · Models 2 & 3
Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
Score: 88.7% · Lower = rushed or shallow review
88.7%
Residual Risk
Residual Risk · Core Equation
Residual = Change × (1 − Confidence)
Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
Score: 6.6% · Safe to merge
6.6%
Repository