Skip to content

Rename some more of our internal #[rustc_*] TEST attributes#155027

Open
fmease wants to merge 6 commits intorust-lang:mainfrom
fmease:more-test-attr-renamings
Open

Rename some more of our internal #[rustc_*] TEST attributes#155027
fmease wants to merge 6 commits intorust-lang:mainfrom
fmease:more-test-attr-renamings

Conversation

@fmease
Copy link
Copy Markdown
Member

@fmease fmease commented Apr 9, 2026

Follow-up to #153300.

r? JonathanBrouwer or jdonszelmann

@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 9, 2026

The rustc-dev-guide subtree was changed. If this PR only touches the dev guide consider submitting a PR directly to rust-lang/rustc-dev-guide otherwise thank you for updating the dev guide with your changes.

cc @BoxyUwU, @tshepang

Some changes occurred in compiler/rustc_passes/src/check_attr.rs

cc @jdonszelmann, @JonathanBrouwer

Some changes occurred in compiler/rustc_attr_parsing

cc @jdonszelmann, @JonathanBrouwer

Some changes occurred in compiler/rustc_hir/src/attrs

cc @jdonszelmann, @JonathanBrouwer

These commits modify the Cargo.lock file. Unintentional changes to Cargo.lock can be introduced when switching branches and rebasing PRs.

If this was unintentional then you should revert the changes before this PR is merged.
Otherwise, you can ignore this comment.

@rustbot rustbot added the A-attributes Area: Attributes (`#[…]`, `#![…]`) label Apr 9, 2026
@rustbot rustbot added A-rustc-dev-guide Area: rustc-dev-guide S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Apr 9, 2026
@fmease fmease changed the title Rename some more of our internal #[rustc_*] TEST attributes Rename some more of our internal #[rustc_*] TEST attributes Apr 9, 2026
@rust-log-analyzer
Copy link
Copy Markdown
Collaborator

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

Click to see the possible cause of the failure (guessed by this bot)
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-03-05/rustfmt-nightly-aarch64-unknown-linux-gnu.tar.xz
---

10 LL | enum UninhabitedVariantSpace {
11    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
12 
- error: abi: ScalarPair(Initialized { value: Int(I8, false), valid_range: 0..=1 }, Initialized { value: Int(I8, false), valid_range: 0..=255 })
+ error: backend_repr: ScalarPair(Initialized { value: Int(I8, false), valid_range: 0..=1 }, Initialized { value: Int(I8, false), valid_range: 0..=255 })
14   --> $DIR/enum.rs:21:1
15    |
16 LL | enum ScalarPairDifferingSign {


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 layout/enum.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/layout/enum.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/layout/enum" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "incomplete_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: align: AbiAlign { abi: Align(2 bytes) }
##[error]  --> /checkout/tests/ui/layout/enum.rs:9:1
   |
LL | enum UninhabitedVariantAlign { //~ERROR: backend_repr: Align(2 bytes)
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: size: Size(16 bytes)
##[error]  --> /checkout/tests/ui/layout/enum.rs:15:1
   |
LL | enum UninhabitedVariantSpace { //~ERROR: size: Size(16 bytes)
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: backend_repr: ScalarPair(Initialized { value: Int(I8, false), valid_range: 0..=1 }, Initialized { value: Int(I8, false), valid_range: 0..=255 })
##[error]  --> /checkout/tests/ui/layout/enum.rs:21:1
   |
LL | enum ScalarPairDifferingSign { //~ERROR: backend_repr: ScalarPair
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: size: Size(4 bytes)
##[error]  --> /checkout/tests/ui/layout/enum.rs:31:1
   |
LL | enum DefinedLayoutAllUninhabited { //~ERROR: size: Size(4 bytes)
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

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

---
- error: abi: Memory { sized: true }
+ error: backend_repr: Memory { sized: true }
2   --> $DIR/struct.rs:9:1
3    |
4 LL | struct AlignedZstPreventsScalar(i16, [i32; 0]);

5    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6 
- error: abi: Scalar(Initialized { value: Int(I32, true), valid_range: 0..=4294967295 })
+ error: backend_repr: Scalar(Initialized { value: Int(I32, true), valid_range: 0..=4294967295 })
8   --> $DIR/struct.rs:12:1
9    |
10 LL | struct AlignedZstButStillScalar(i32, [i16; 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 layout/struct.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/layout/struct.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/layout/struct" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "incomplete_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: backend_repr: Memory { sized: true }
##[error]  --> /checkout/tests/ui/layout/struct.rs:9:1
   |
LL | struct AlignedZstPreventsScalar(i16, [i32; 0]); //~ERROR: backend_repr: Memory
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: backend_repr: Scalar(Initialized { value: Int(I32, true), valid_range: 0..=4294967295 })
##[error]  --> /checkout/tests/ui/layout/struct.rs:12:1
   |
LL | struct AlignedZstButStillScalar(i32, [i16; 0]); //~ERROR: backend_repr: Scalar
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-attributes Area: Attributes (`#[…]`, `#![…]`) A-rustc-dev-guide Area: rustc-dev-guide S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants