Skip to content

Commit 9cebb04

Browse files
committed
Auto merge of #139137 - petrochenkov:errwhere2, r=jieyouxu
compiletest: Require `//~` annotations even if `error-pattern` is specified This is continuation of #138865 with some help from #139100. `error-pattern` annotations that duplicate the newly added `//~` annotations are removed, other `error-pattern`s are not touched yet. In exceptional cases `//@ compile-flags: --error-format=human` can be used to opt out of these checks. In this PR I only had to use the opt out 3 times: - `tests/ui/parser/utf16-{be,le}-without-bom.rs` - there are too many errors that are nearly identical (modulo location), because an error is reported on every second symbol - `tests/ui-fulldeps/missing-rustc-driver-error.rs` - the errors list various rustc crate dependencies and may unexpectedly invalidate on random rustc changes
2 parents bd26aa7 + 8f4357e commit 9cebb04

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/tests/ui.md

+3
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,9 @@ But for strict testing, try to use the `ERROR` annotation as much as possible,
335335
including `//~?` annotations for diagnostics without span.
336336
For compile time diagnostics `error-pattern` should very rarely be necessary.
337337

338+
Per-line annotations (`//~`) are still checked in tests using `error-pattern`,
339+
to opt out of these checks in exceptional cases use `//@ compile-flags: --error-format=human`.
340+
338341
### Error levels
339342

340343
The error levels that you can have are:

0 commit comments

Comments
 (0)