-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
compiletest: Support matching on diagnostics without a span #138865
Conversation
r? @wesleywiser rustbot has assigned @wesleywiser. Use |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
r? jieyouxu |
This comment was marked as resolved.
This comment was marked as resolved.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! The impl looks good to me, though some tests may need further adjusting (with some back and forth) due to platform specificness and other ignore conditions.
Please ping me when you rebase/rebless so I can try to review ASAP, otherwise this will likely conflict very quickly. |
Also, now that rustc-dev-guide is also a subtree, can you please adjust the UI annotations page in rustc-dev-guide at https://rustc-dev-guide.rust-lang.org/tests/ui.html#error-annotations in this same PR? So that people will know about what |
The rustc-dev-guide subtree was changed. If this PR only touches the dev guide consider submitting a PR directly to rust-lang/rustc-dev-guide otherwise thank you for updating the dev guide with your changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, both the impl and the test diffs look good to me!
r=me if the PR CI comes back green. |
@bors r=jieyouxu |
compiletest: Support matching on diagnostics without a span Using `//~? ERROR my message` on any line of the test. The new checks are exhaustive, like all other `//~` checks, and unlike the `error-pattern` directive that is sometimes used now to check for span-less diagnostics. This will allow to eliminate most on `error-pattern` directives in compile-fail tests (except those that are intentionally imprecise due to platform-specific diagnostics). I didn't migrate any of `error-pattern`s in this PR though, except those where the migration was necessary for the tests to pass.
This comment has been minimized.
This comment has been minimized.
This comment was marked as resolved.
This comment was marked as resolved.
@bors r=jieyouxu |
☀️ Test successful - checks-actions |
Finished benchmarking commit (40507bd): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)Results (primary -2.1%, secondary 0.0%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 777.999s -> 778.257s (0.03%) |
Using
//~? ERROR my message
on any line of the test.The new checks are exhaustive, like all other
//~
checks, and unlike theerror-pattern
directive that is sometimes used now to check for span-less diagnostics.This will allow to eliminate most on
error-pattern
directives in compile-fail tests (except those that are intentionally imprecise due to platform-specific diagnostics).I didn't migrate any of
error-pattern
s in this PR though, except those where the migration was necessary for the tests to pass.