Skip to content

Commit 631bdba

Browse files
author
The Miri Cronjob Bot
committed
Merge ref 'b56aaec52bc0' from rust-lang/rust
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: b56aaec52bc0fa35591a872fb4aac81f606e265c Filtered ref: 12f5e3255df658296af9fc953d8c1ab79ba91ea3 This merge was created using https://github.com/rust-lang/josh-sync.
2 parents d7e461d + 2f09023 commit 631bdba

File tree

8 files changed

+19
-19
lines changed

8 files changed

+19
-19
lines changed

src/asm.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,9 +155,9 @@ can't know ahead of time whether a function will require a frame/base pointer.
155155

156156
Various tests for inline assembly are available:
157157

158-
- `tests/assembly/asm`
158+
- `tests/assembly-llvm/asm`
159159
- `tests/ui/asm`
160-
- `tests/codegen/asm-*`
160+
- `tests/codegen-llvm/asm-*`
161161

162162
Every architecture supported by inline assembly must have exhaustive tests in
163-
`tests/assembly/asm` which test all combinations of register classes and types.
163+
`tests/assembly-llvm/asm` which test all combinations of register classes and types.

src/autodiff/installation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ rustup toolchain install nightly # enables -Z unstable-options
2525
You can then run our test cases:
2626

2727
```bash
28-
./x test --stage 1 tests/codegen/autodiff
28+
./x test --stage 1 tests/codegen-llvm/autodiff
2929
./x test --stage 1 tests/pretty/autodiff
3030
./x test --stage 1 tests/ui/autodiff
3131
./x test --stage 1 tests/ui/feature-gates/feature-gate-autodiff.rs

src/llvm-coverage-instrumentation.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ human-readable coverage report.
117117
> directive, so they will be skipped if the profiler runtime has not been
118118
> [enabled in `bootstrap.toml`](#recommended-configtoml-settings).
119119
120-
Finally, the [`tests/codegen/instrument-coverage/testprog.rs`] test compiles a simple Rust program
120+
Finally, the [`tests/codegen-llvm/instrument-coverage/testprog.rs`] test compiles a simple Rust program
121121
with `-C instrument-coverage` and compares the compiled program's LLVM IR to
122122
expected LLVM IR instructions and structured data for a coverage-enabled
123123
program, including various checks for Coverage Map-related metadata and the LLVM
@@ -136,4 +136,4 @@ and `mir-opt` tests can be refreshed by running:
136136
[`tests/coverage`]: https://github.com/rust-lang/rust/tree/master/tests/coverage
137137
[`src/tools/coverage-dump`]: https://github.com/rust-lang/rust/tree/master/src/tools/coverage-dump
138138
[`tests/coverage-run-rustdoc`]: https://github.com/rust-lang/rust/tree/master/tests/coverage-run-rustdoc
139-
[`tests/codegen/instrument-coverage/testprog.rs`]: https://github.com/rust-lang/rust/blob/master/tests/mir-opt/coverage/instrument_coverage.rs
139+
[`tests/codegen-llvm/instrument-coverage/testprog.rs`]: https://github.com/rust-lang/rust/blob/master/tests/mir-opt/coverage/instrument_coverage.rs

src/offload/installation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ This gives you a working LLVM build.
4040
## Testing
4141
run
4242
```
43-
./x test --stage 1 tests/codegen/gpu_offload
43+
./x test --stage 1 tests/codegen-llvm/gpu_offload
4444
```
4545

4646
## Usage

src/profile-guided-optimization.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ There is also a [codegen test][codegen-test] that checks that some expected
132132
instrumentation artifacts show up in LLVM IR.
133133

134134
[rmake-tests]: https://github.com/rust-lang/rust/tree/master/tests/run-make
135-
[codegen-test]: https://github.com/rust-lang/rust/blob/master/tests/codegen/pgo-instrumentation.rs
135+
[codegen-test]: https://github.com/rust-lang/rust/blob/master/tests/codegen-llvm/pgo-instrumentation.rs
136136

137137
## Additional information
138138

src/sanitizers.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ implementation:
7676
## Testing sanitizers
7777

7878
Sanitizers are validated by code generation tests in
79-
[`tests/codegen/sanitize*.rs`][test-cg] and end-to-end functional tests in
79+
[`tests/codegen-llvm/sanitize*.rs`][test-cg] and end-to-end functional tests in
8080
[`tests/ui/sanitizer/`][test-ui] directory.
8181

8282
Testing sanitizer functionality requires the sanitizer runtimes (built when
@@ -85,7 +85,7 @@ sanitizer. When sanitizer is unsupported on given target, sanitizers tests will
8585
be ignored. This behaviour is controlled by compiletest `needs-sanitizer-*`
8686
directives.
8787

88-
[test-cg]: https://github.com/rust-lang/rust/tree/master/tests/codegen
88+
[test-cg]: https://github.com/rust-lang/rust/tree/master/tests/codegen-llvm
8989
[test-ui]: https://github.com/rust-lang/rust/tree/master/tests/ui/sanitizer
9090

9191
## Enabling sanitizer on a new target

src/tests/compiletest.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ The following test suites are available, with links for more information:
6868
| [`pretty`](#pretty-printer-tests) | Check pretty printing |
6969
| [`incremental`](#incremental-tests) | Check incremental compilation behavior |
7070
| [`debuginfo`](#debuginfo-tests) | Check debuginfo generation running debuggers |
71-
| [`codegen`](#codegen-tests) | Check code generation |
71+
| [`codegen-*`](#codegen-tests) | Check code generation |
7272
| [`codegen-units`](#codegen-units-tests) | Check codegen unit partitioning |
7373
| [`assembly`](#assembly-tests) | Check assembly output |
7474
| [`mir-opt`](#mir-opt-tests) | Check MIR generation and optimizations |
@@ -290,7 +290,7 @@ For example, `./x test tests/debuginfo -- --debugger gdb` will only test GDB com
290290
291291
### Codegen tests
292292

293-
The tests in [`tests/codegen`] test LLVM code generation. They compile the test
293+
The tests in [`tests/codegen-llvm`] test LLVM code generation. They compile the test
294294
with the `--emit=llvm-ir` flag to emit LLVM IR. They then run the LLVM
295295
[FileCheck] tool. The test is annotated with various `// CHECK` comments to
296296
check the generated code. See the [FileCheck] documentation for a tutorial and
@@ -301,13 +301,13 @@ See also the [assembly tests](#assembly-tests) for a similar set of tests.
301301
If you need to work with `#![no_std]` cross-compiling tests, consult the
302302
[`minicore` test auxiliary](./minicore.md) chapter.
303303

304-
[`tests/codegen`]: https://github.com/rust-lang/rust/tree/master/tests/codegen
304+
[`tests/codegen-llvm`]: https://github.com/rust-lang/rust/tree/master/tests/codegen-llvm
305305
[FileCheck]: https://llvm.org/docs/CommandGuide/FileCheck.html
306306

307307

308308
### Assembly tests
309309

310-
The tests in [`tests/assembly`] test LLVM assembly output. They compile the test
310+
The tests in [`tests/assembly-llvm`] test LLVM assembly output. They compile the test
311311
with the `--emit=asm` flag to emit a `.s` file with the assembly output. They
312312
then run the LLVM [FileCheck] tool.
313313

@@ -324,7 +324,7 @@ See also the [codegen tests](#codegen-tests) for a similar set of tests.
324324
If you need to work with `#![no_std]` cross-compiling tests, consult the
325325
[`minicore` test auxiliary](./minicore.md) chapter.
326326

327-
[`tests/assembly`]: https://github.com/rust-lang/rust/tree/master/tests/assembly
327+
[`tests/assembly-llvm`]: https://github.com/rust-lang/rust/tree/master/tests/assembly-llvm
328328

329329

330330
### Codegen-units tests

src/tests/ui.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,8 @@ fn main((ؼ
309309

310310
Use `//~?` to match an error without line information.
311311
`//~?` is precise and will not match errors if their line information is available.
312-
It should be preferred to using `error-pattern`, which is imprecise and non-exhaustive.
312+
For tests wishing to match against compiler diagnostics, error annotations should
313+
be preferred over //@ error-pattern, //@ error-pattern is imprecise and non-exhaustive.
313314

314315
```rust,ignore
315316
//@ compile-flags: --print yyyy
@@ -347,8 +348,6 @@ fn main() {
347348
}
348349
```
349350

350-
Use of `error-pattern` is not recommended in general.
351-
352351
For strict testing of compile time output, try to use the line annotations `//~` as much as
353352
possible, including `//~?` annotations for diagnostics without spans.
354353

@@ -359,7 +358,8 @@ Some of the compiler messages can stay uncovered by annotations in this mode.
359358

360359
For checking runtime output, `//@ check-run-results` may be preferable.
361360

362-
Only use `error-pattern` if none of the above works.
361+
Only use `error-pattern` if none of the above works, such as when finding a
362+
specific string pattern in a runtime panic output.
363363

364364
Line annotations `//~` and `error-pattern` are compatible and can be used in the same test.
365365

0 commit comments

Comments
 (0)