Skip to content

Commit 9c87e96

Browse files
committed
Adjust some outdated docs for //@ forbid-output
1 parent f27c777 commit 9c87e96

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

src/tests/compiletest.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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)