-
Notifications
You must be signed in to change notification settings - Fork 71
compiletest: Make diagnostic kind mandatory on line annotations #862
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Important This issue is not meant to be used for technical discussion. There is a Zulip stream for that. Concerns or objections can formally be registered here by adding a comment.
Concerns can be lifted with:
See documentation at https://forge.rust-lang.org |
@rustbot second |
This has been > 10 days and no concerns, so |
This comment has been minimized.
This comment has been minimized.
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 - rust-lang#139427. 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 - rust-lang#139427. r? `@jieyouxu`
Proposal
This is an MCP for PR rust-lang/rust#139720.
Compiletest currently accepts line annotations without kind in UI tests.
Such annotations have two effects.
//~ NOTE my msg
in a test requires all otherNOTE
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
.The proposal is to remove support for
//~ my message
annotations and always require specifying the kind.Unwanted additional annotations can be suppressed using the
dont-require-annotations
directive if necessary.Mentors or Reviewers
@jieyouxu
Process
The main points of the Major Change Process are as follows:
@rustbot second
.-C flag
, then full team check-off is required.@rfcbot fcp merge
on either the MCP or the PR.You can read more about Major Change Proposals on forge.
The text was updated successfully, but these errors were encountered: