Skip to content

Commit ff8baea

Browse files
committed
Rename tests/ui/SUMMARY.md and update rustc dev guide on error-pattern
1 parent a7a1618 commit ff8baea

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/doc/rustc-dev-guide/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 compile time tests, it should be preferred to using `error-pattern`, which
313+
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

File renamed without changes.

0 commit comments

Comments
 (0)