Skip to content

Commit 16b2421

Browse files
author
The Miri Cronjob Bot
committed
Merge ref 'e96bb7e44fbc' from rust-lang/rust
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: rust-lang/rust@e96bb7e Filtered ref: rust-lang/miri@4304ab0 Upstream diff: rust-lang/rust@873d468...e96bb7e This merge was created using https://github.com/rust-lang/josh-sync.
2 parents c42c25b + 6f289ec commit 16b2421

3 files changed

Lines changed: 11 additions & 4 deletions

File tree

src/conventions.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,7 @@ These use a pinned version of `ruff`, to avoid relying on the local environment.
7676
<!-- REUSE-IgnoreEnd -->
7777

7878
In the past, files began with a copyright and license notice.
79-
Please **omit** this notice for new files licensed under the standard terms (dual
80-
MIT/Apache-2.0).
79+
Please **omit** this notice for new files licensed under the standard terms (MIT OR Apache-2.0).
8180

8281
All of the copyright notices should be gone by now, but if you come across one
8382
in the rust-lang/rust repo, feel free to open a PR to remove it.

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)