Skip to content

Commit f2b52d0

Browse files
committed
Auto merge of #155542 - JonathanBrouwer:rollup-F7GZlGr, r=JonathanBrouwer
Rollup of 10 pull requests Successful merges: - rust-lang/rust#155054 (constify `Index(Mut)`, `Deref(Mut)` for `Vec`) - rust-lang/rust#155264 (Add autocast support for `x86amx`) - rust-lang/rust#155507 (suggest expect instead of unwrap when arg provided) - rust-lang/rust#154664 (core/num: Implement feature `integer_cast_extras`) - rust-lang/rust#155238 (compiletest: add a new diff for compare-out-by-lines tests.) - rust-lang/rust#155474 (Rename incremental `cfail`/`cpass` revisions to `bfail`/`bpass`) - rust-lang/rust#155493 (docs(num): fix stale link to `mem::Alignment`) - rust-lang/rust#155529 (Remove `AttributeLintKind` variants - part 3) - rust-lang/rust#155531 (Tweak `is_ascii_punctuation()` docs wording) - rust-lang/rust#155533 (Provide a const new for `GlobalCache`)
2 parents 592b9fb + 85b5609 commit f2b52d0

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

src/tests/compiletest.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,8 @@ then runs the compiler for each revision, reusing the incremental results from p
158158

159159
The revisions should start with:
160160

161-
* `cfail` — the test should fail to compile
162-
* `cpass` — the test should compile successully
161+
* `bfail` — the test should fail to compile
162+
* `bpass` — the test should compile successully
163163
* `rpass` — the test should compile and run successfully
164164

165165
To make the revisions unique, you should add a suffix like `rpass1` and `rpass2`.
@@ -185,7 +185,7 @@ fn foo() {
185185
fn main() { foo(); }
186186
```
187187

188-
`cfail` tests support the `forbid-output` directive to specify that a certain
188+
Incremental tests support the `forbid-output` directive to specify that a certain
189189
substring must not appear anywhere in the compiler output.
190190
This can be useful to ensure certain errors do not appear, but this can be fragile as error messages
191191
change over time, and a test may no longer be checking the right thing but will still pass.

src/tests/directives.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ comparison](ui.md#output-comparison) and [Rustfix tests](ui.md#rustfix-tests) fo
106106
| `exec-env` | Env var to set when executing a test | `ui`, `crashes` | `<KEY>=<VALUE>` |
107107
| `unset-exec-env` | Env var to unset when executing a test | `ui`, `crashes` | Any env var name |
108108
| `stderr-per-bitwidth` | Generate a stderr snapshot for each bitwidth | `ui` | N/A |
109-
| `forbid-output` | A pattern which must not appear in stderr/`cfail` output | `ui`, `incremental` | Regex pattern |
109+
| `forbid-output` | Check that compile/run output does not contain a specific string | `ui`, `incremental` | String |
110110
| `run-flags` | Flags passed to the test executable | `ui` | Arbitrary flags |
111111
| `known-bug` | No error annotation needed due to known bug | `ui`, `crashes`, `incremental` | Issue number `#123456` |
112112
| `compare-output-by-lines` | Compare the output by lines, rather than as a single string | All | N/A |
@@ -315,8 +315,7 @@ See [Pretty-printer](compiletest.md#pretty-printer-tests).
315315

316316
- `no-auto-check-cfg` — disable auto check-cfg (only for `--check-cfg` tests)
317317
- [`revisions`](compiletest.md#revisions) — compile multiple times
318-
-[`forbid-output`](compiletest.md#incremental-tests) — incremental cfail rejects
319-
output pattern
318+
- [`forbid-output`](compiletest.md#incremental-tests) — check that output does not contain a specified string
320319
- [`reference`] — an annotation linking to a rule in the reference
321320
- `disable-gdb-pretty-printers` — disable gdb pretty printers for debuginfo tests
322321

0 commit comments

Comments
 (0)