Skip to content

Commit a136707

Browse files
committed
Auto merge of #151667 - Zalathar:rollup-OzG0S5m, r=Zalathar
Rollup of 6 pull requests Successful merges: - rust-lang/rust#151611 (Improve is_ascii performance on x86_64 with explicit SSE2 intrinsics) - rust-lang/rust#150705 (Add missing mut to pin.rs docs) - rust-lang/rust#151294 (compiletest: add implied `needs-target-std` for `codegen` mode tests unless annotated with `#![no_std]`/`#![no_core]`) - rust-lang/rust#151589 (Add a `documentation` remapping path scope for rustdoc usage) - rust-lang/rust#151639 (Fix broken WASIp1 reference link) - rust-lang/rust#151645 (Update `sysinfo` version to `0.38.0`)
2 parents e49fee1 + 68fa2eb commit a136707

2 files changed

Lines changed: 10 additions & 2 deletions

File tree

src/tests/compiletest.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -311,14 +311,20 @@ For example, `./x test tests/debuginfo -- --debugger gdb` will only test GDB com
311311
312312
### Codegen tests
313313

314-
The tests in [`tests/codegen-llvm`] test LLVM code generation. They compile the test
315-
with the `--emit=llvm-ir` flag to emit LLVM IR. They then run the LLVM
314+
The tests in [`tests/codegen-llvm`] test LLVM code generation. They compile the
315+
test with the `--emit=llvm-ir` flag to emit LLVM IR. They then run the LLVM
316316
[FileCheck] tool. The test is annotated with various `// CHECK` comments to
317317
check the generated code. See the [FileCheck] documentation for a tutorial and
318318
more information.
319319

320320
See also the [assembly tests](#assembly-tests) for a similar set of tests.
321321

322+
By default, codegen tests will have `//@ needs-target-std` *implied* (that the
323+
target needs to support std), *unless* the `#![no_std]`/`#![no_core]` attribute
324+
was specified in the test source. You can override this behavior and explicitly
325+
write `//@ needs-target-std` to only run the test when target supports std, even
326+
if the test is `#![no_std]`/`#![no_core]`.
327+
322328
If you need to work with `#![no_std]` cross-compiling tests, consult the
323329
[`minicore` test auxiliary](./minicore.md) chapter.
324330

src/tests/directives.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,8 @@ The following directives will check rustc build settings and target settings:
200200
on `wasm32-unknown-unknown` target because the target does not support the
201201
`proc-macro` crate type.
202202
- `needs-target-std` — ignores if target platform does not have std support.
203+
- See also [`#![no_std]`/`#![no_core]` and implied `needs-target-std` for
204+
codegen tests](./compiletest.md#codegen-tests).
203205
- `ignore-backends` — ignores the listed backends, separated by whitespace characters.
204206
Please note
205207
that this directive can be overriden with the `--bypass-ignore-backends=[BACKEND]` command line

0 commit comments

Comments
 (0)