Skip to content

Commit c3781af

Browse files
committed
Auto merge of #156916 - JonathanBrouwer:rollup-CbeVZH2, r=JonathanBrouwer
Rollup of 3 pull requests Successful merges: - rust-lang/rust#156862 (Convert strict_provenance_lints to late lint passes) - rust-lang/rust#156879 (Replace rustfmt code of conduct with link) - rust-lang/rust#156901 (compiletest: Simplify `//@ needs-asm-mnemonic: ret` to just `//@ needs-asm-ret`)
2 parents 93fc31e + 908708f commit c3781af

2 files changed

Lines changed: 4 additions & 14 deletions

File tree

src/tests/compiletest.md

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -346,17 +346,6 @@ See also the [codegen tests](#codegen-tests) for a similar set of tests.
346346
If you need to work with `#![no_std]` cross-compiling tests, consult the
347347
[`minicore` test auxiliary](./minicore.md) chapter.
348348

349-
#### Conditional assembly tests based on instruction support
350-
351-
Tests that depend on specific assembly instructions being available can use the
352-
`//@ needs-asm-mnemonic: <MNEMONIC>` directive.
353-
This will skip the test if the target backend does not support the specified instruction mnemonic.
354-
355-
For example, a test that requires the `RET` instruction:
356-
```rust,ignore
357-
//@ needs-asm-mnemonic: RET
358-
```
359-
360349
[`tests/assembly-llvm`]: https://github.com/rust-lang/rust/tree/HEAD/tests/assembly-llvm
361350

362351

src/tests/directives.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -164,9 +164,10 @@ The following directives will check rustc build settings and target settings:
164164
For tests that cross-compile to explicit targets
165165
via `--target`, use `needs-llvm-components` instead to ensure the appropriate
166166
backend is available.
167-
- `needs-asm-mnemonic: <MNEMONIC>` — ignores if the target backend does not
168-
support the specified assembly mnemonic (e.g., `RET`, `NOP`).
169-
Only supported with the LLVM backend.
167+
- `needs-asm-ret` - ignores if the target does not have a `ret` instruction
168+
in its assembly syntax. Most target architectures have this instruction,
169+
making it handy for portable inline-assembly tests, but some architectures
170+
(e.g. 32-bit ARM) do not have it.
170171
- `needs-profiler-runtime` — ignores the test if the profiler runtime was not
171172
enabled for the target (`build.profiler = true` in `bootstrap.toml`)
172173
- `needs-sanitizer-support` — ignores if the sanitizer support was not enabled

0 commit comments

Comments
 (0)