Commit 51762a9
committed
Auto merge of #139720 - petrochenkov:errkind2, r=jieyouxu
compiletest: Make diagnostic kind mandatory on line annotations (take 2)
Compiletest currently accepts line annotations without kind in UI tests.
```
let a = b + c; //~ my message
```
Such annotations have two effects.
- First, they match any compiler-produced diagnostic kind. This functionality is never used in practice, there are no target-dependent diagnostic kinds of something like that.
- Second, they are not "viral". For example, any explicit `//~ NOTE my msg` in a test requires all other `NOTE` diagnostics in the same test to be annotated. Implicit `//~ my msg` will just match the note and won't require other annotations.
The second functionality has a replacement since recently - directive `//@ dont-require-annotations: NOTE`.
This PR removes support for `//~ my message` and makes the explicit diagnostic kind mandatory.
Unwanted additional annotations are suppressed using the `dont-require-annotations` directive.
Closes rust-lang/compiler-team#862.
Previous attempt - #139427.
r? `@jieyouxu`1 file changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
372 | 372 | | |
373 | 373 | | |
374 | 374 | | |
375 | | - | |
376 | | - | |
377 | | - | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
378 | 378 | | |
379 | 379 | | |
380 | 380 | | |
| |||
0 commit comments