-
Notifications
You must be signed in to change notification settings - Fork 13.3k
compiletest: error-pattern and warnings are not checked in run-pass tests #35165
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
Nice catch. |
An easy way to get started fixing this is to add proper checks for the warnings to run-pass. It should be relatively easy to crib off the compile-fail code to figure out how to do it. Additionally add code that makes error directives For any tests that begin to fail because of these changes, if the fix is obvious, then fix it, otherwise check with the author of those tests (or ask here) to figure out how to proceed. |
Can I try working on this? |
@terrynsun Absolutely! You might want to take a look at the implementation of compiletest::runtest::run_cfail_test for clues on what to add to compiletest::runtest::run_rpass_test. |
I have a fix for this, I just need a few other PRs to land first. |
Cool! Sorry for taking so long to try to work on this. |
This should be closed, since the associated PR is in tree, right? |
@Michael-Zapata True, thanks for the reminder! |
There are some
run-pass
tests that seemingly check whether a specific warning or error is emitted. As far as I can tell though, thecompiletest
tool just ignores the given directives in arun-pass
test case, i.e. changing the given directives to something unexpected still lets the tests pass.Some affected test cases (in no particular order):
attr-before-view-item.rs
attr-before-view-item2.rs
deprecated-macro_escape-inner.rs
deprecated-macro_escape.rs
deriving-meta-empty-trait-list.rs
liveness-assign-imm-local-after-ret.rs
unreachable-code-1.rs
auxiliary/const_fn_lib.rs
auxiliary/issue_3136_a.rs
enum-size-variance.rs
issue-25757.rs
pred-not-bool.rs
issue-19100.rs
issue-2611-3.rs
cc @rust-lang/compiler @rust-lang/tools
The text was updated successfully, but these errors were encountered: