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
This commit is contained in:
commit
9cebb04a9d
|
|
@ -335,6 +335,9 @@ But for strict testing, try to use the `ERROR` annotation as much as possible,
|
|||
including `//~?` annotations for diagnostics without span.
|
||||
For compile time diagnostics `error-pattern` should very rarely be necessary.
|
||||
|
||||
Per-line annotations (`//~`) are still checked in tests using `error-pattern`,
|
||||
to opt out of these checks in exceptional cases use `//@ compile-flags: --error-format=human`.
|
||||
|
||||
### Error levels
|
||||
|
||||
The error levels that you can have are:
|
||||
|
|
|
|||
Loading…
Reference in New Issue