Change derive macro for Eq to not impl Eq trait fn #153125
Changes to the code generated for builtin derived traits.
cc @nnethercote
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.
It would be a nice follow-up to not emit these when assert_fields_are_eq is empty.
A test case that seems like might break with this:
trait Trait<T> {}
#[derive(PartialEq, Eq)]
struct Thing<T: Trait<Self>>(T);
A less exotic test case:
#[derive(PartialEq, Eq)]
struct Thing(Option<Box<Self>>);
Nick, I would reassign to you (feel free to reroll) since @cyrgani is a triage member and can't approve compiler changes
r? nnethercote
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.
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>
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>
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)
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>
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>
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>
Looks like CI is passing now, r? @nnethercote
Requested reviewer is already assigned to this pull request.
Please choose another assignee.
You should be able to delete the fn assert_fields_are_eq(&self) {} method from the Eq trait again now.
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?
I guess this will also need #[inline] like https://github.com/rust-lang/rust/pull/153157?
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.
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.
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.
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?
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.
:umbrella: The latest upstream changes (presumably #153157) made this pull request unmergeable. Please resolve the merge conflicts.
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.
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.
@bors try @rust-timer queue
@KiChjang: :key: Insufficient privileges: not in try users
Insufficient permissions to issue commands to rust-timer.
<!-- rust-timer: temporary -->
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.
This isn't even valid syntax, it should be const _: () = {.
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>
This is the code that gets generated when I tell the compiler to emit a ast::ItemKind::ConstBlock:
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>
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>
Weird. Maybe a pretty printing issue? Would be good to understand what's happening here.
Please put blank lines between the methods, here and elsewhere.
Blank line after the struct, and likewise below.
Also, the three visitors need a brief comment explaining what they are doing and why.
A brief example of the kind of code being generated would be helpful here.
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?
Also, why is the parameter (when present) *const T? Could it just be T?
Also, why is the parameter (when present)*const T? Could it just beT?
Probably to work with ?Sized types?
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).
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>;
// ...
}
}
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.
> 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>
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.
nnethercote
KiChjang
<!-- 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