Skip to content

compiletest: Simplify //@ needs-asm-mnemonic: ret to just //@ needs-asm-ret#156901

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
Zalathar:needs-asm-ret
May 25, 2026
Merged

compiletest: Simplify //@ needs-asm-mnemonic: ret to just //@ needs-asm-ret#156901
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
Zalathar:needs-asm-ret

Conversation

@Zalathar
Copy link
Copy Markdown
Member


The needs-asm-mnemonic directive was very general, but in practice was only being used for ret. There are very few other mnemonics that it could plausibly be useful for (e.g. nop), because any instruction that requires arguments is probably going to be non-portable.

This PR replaces needs-asm-mnemonic with a simpler needs-asm-ret directive that uses the same machinery as other simple needs directives.

If we happend to need more mnemonics in the future, we can just add more simple directives as appropriate (e.g. needs-asm-nop).

The `needs-asm-mnemonic` directive was very general, but in practice was only
being used for `ret`. There are very few other mnemonics that it could
plausibly be useful for (e.g. `nop`), because any instruction that requires
arguments is probably going to be non-portable.

This PR replaces `needs-asm-mnemonic` with a simpler `needs-asm-ret` directive
that uses the same machinery as other simple needs directives.

If we happend to need more mnemonics in the future, we can just add more simple
directives as appropriate (e.g. `needs-asm-nop`).
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented May 25, 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

compiletest directives have been modified. Please add or update docs for the
new or modified directive in src/doc/rustc-dev-guide/.

Some changes occurred in src/tools/compiletest

cc @jieyouxu

@rustbot rustbot added A-compiletest Area: The compiletest test runner A-run-make Area: port run-make Makefiles to rmake.rs A-rustc-dev-guide Area: rustc-dev-guide A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels May 25, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented May 25, 2026

r? @oli-obk

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

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: @jieyouxu, @oli-obk, @wesleywiser, bootstrap
  • @jieyouxu, @oli-obk, @wesleywiser, bootstrap expanded to 8 candidates
  • Random selection from Mark-Simulacrum, clubby789, oli-obk, wesleywiser

@folkertdev
Copy link
Copy Markdown
Contributor

r? folkertdev

r=me when CI is green

@rustbot rustbot assigned folkertdev and unassigned oli-obk May 25, 2026
@folkertdev
Copy link
Copy Markdown
Contributor

@bors r+ rollup

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented May 25, 2026

📌 Commit 028b8b6 has been approved by folkertdev

It is now in the queue for this repository.

@rust-bors rust-bors Bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 25, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request May 25, 2026
compiletest: Simplify `//@ needs-asm-mnemonic: ret` to just `//@ needs-asm-ret`

- Simplification of rust-lang#155692.
---

The `needs-asm-mnemonic` directive was very general, but in practice was only being used for `ret`. There are very few other mnemonics that it could plausibly be useful for (e.g. `nop`), because any instruction that requires arguments is probably going to be non-portable.

This PR replaces `needs-asm-mnemonic` with a simpler `needs-asm-ret` directive that uses the same machinery as other simple needs directives.

If we happend to need more mnemonics in the future, we can just add more simple directives as appropriate (e.g. `needs-asm-nop`).
rust-bors Bot pushed a commit that referenced this pull request May 25, 2026
…uwer

Rollup of 3 pull requests

Successful merges:

 - #156900 (stdarch subtree update)
 - #156887 (Rename `-Zdebuginfo-for-profiling` switch)
 - #156901 (compiletest: Simplify `//@ needs-asm-mnemonic: ret` to just `//@ needs-asm-ret`)
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request May 25, 2026
compiletest: Simplify `//@ needs-asm-mnemonic: ret` to just `//@ needs-asm-ret`

- Simplification of rust-lang#155692.
---

The `needs-asm-mnemonic` directive was very general, but in practice was only being used for `ret`. There are very few other mnemonics that it could plausibly be useful for (e.g. `nop`), because any instruction that requires arguments is probably going to be non-portable.

This PR replaces `needs-asm-mnemonic` with a simpler `needs-asm-ret` directive that uses the same machinery as other simple needs directives.

If we happend to need more mnemonics in the future, we can just add more simple directives as appropriate (e.g. `needs-asm-nop`).
rust-bors Bot pushed a commit that referenced this pull request May 25, 2026
…uwer

Rollup of 3 pull requests

Successful merges:

 - #156862 (Convert strict_provenance_lints to late lint passes)
 - #156879 (Replace rustfmt code of conduct with link)
 - #156901 (compiletest: Simplify `//@ needs-asm-mnemonic: ret` to just `//@ needs-asm-ret`)
rust-timer added a commit that referenced this pull request May 25, 2026
Rollup merge of #156901 - Zalathar:needs-asm-ret, r=folkertdev

compiletest: Simplify `//@ needs-asm-mnemonic: ret` to just `//@ needs-asm-ret`

- Simplification of #155692.
---

The `needs-asm-mnemonic` directive was very general, but in practice was only being used for `ret`. There are very few other mnemonics that it could plausibly be useful for (e.g. `nop`), because any instruction that requires arguments is probably going to be non-portable.

This PR replaces `needs-asm-mnemonic` with a simpler `needs-asm-ret` directive that uses the same machinery as other simple needs directives.

If we happend to need more mnemonics in the future, we can just add more simple directives as appropriate (e.g. `needs-asm-nop`).
@rust-bors rust-bors Bot merged commit 9545845 into rust-lang:main May 25, 2026
11 checks passed
@rustbot rustbot added this to the 1.98.0 milestone May 25, 2026
@Zalathar Zalathar deleted the needs-asm-ret branch May 25, 2026 22:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-compiletest Area: The compiletest test runner A-run-make Area: port run-make Makefiles to rmake.rs A-rustc-dev-guide Area: rustc-dev-guide A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) 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