Skip to content

Commit 4afe47d

Browse files
authored
Merge pull request #2741 from rust-lang/rustc-pull
Rustc pull update
2 parents ddf8a81 + e56299a commit 4afe47d

3 files changed

Lines changed: 11 additions & 3 deletions

File tree

rust-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
873d4682c7d285540b8f28bfe637006cef8918a6
1+
0462e8f7e51f20692b02d68efee68bb28a6f4457

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)