-
Notifications
You must be signed in to change notification settings - Fork 39
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
On nightlies and betas, cargo +nightly clippy
creates items_after_test_module
warnings
#122
Comments
I opened a bug for the clippy error: frondeus/test-case#122
The error now shows up on the beta clippy (1.71), but not yet on stable (1.70). |
cargo +nightly clippy
creates items_after_test_module
warningscargo +nightly clippy
creates items_after_test_module
warnings
I'm gonna look at this asap. Probably we can just add a simple |
For now I can confirm that with romeval of
|
This seems like great progress to me -- if you don't figure out anything else, you can try to put something like https://github.com/martinvonz/jj/pull/1686/files before that line. I'm not sure if there's a way to make that snippet more elegant. |
I'm going to open a PR to rust-lang/rust-clippy that should fix this, don't worry ❤️ |
`items_after_test_module`: Ignore in-proc-macros items The library `test-case` is having some problems with this lint, ignoring proc macros should fix it. Related to #10713 and frondeus/test-case#122 (Couldn't add test cases for this exact situation without importing the library, but I think the fix is simple enough that we can be pretty sure there won't be any problems :) ) changelog:[`items_after_test_module`]: Ignore items in procedural macros
I think this should be fixed in all Rust versions thanks to rust-lang/rust-clippy#10992 and rust-lang/rust#113417 (thank you!). If you get hit by it, I guess I'll close it, though I haven't completely verified the fix. |
Apparently this bug is still present in clippy 1.71 stable :( Not sure why. It should be fixed in 1.72. |
The fix was backported to the It will be on stable on Aug 24 (the day 1.72 is released). Until that day, users will have to use a beta/nightly toolchain. I may be incorrect, but maybe there's a way to allow this lint on |
FYI I just updated to to clippy 0.1.72 (5680fa18 2023-08-23) which comes with Rust 1.72 and I'm still getting the warning for https://github.com/brettcannon/python-launcher/blob/main/tests/main_tests.rs (I'm going to work around it by disabling the check as the file is integration tests). |
Example:
when running
cargo +nightly clippy
on https://github.com/martinvonz/jj/tree/e3beb82d5fea50a7d55d515237fa800c30526c26.This regards the test at https://github.com/martinvonz/jj/blob/e3beb82d5fea50a7d55d515237fa800c30526c26/lib/tests/test_revset.rs.
This is with
I don't have a minimal example nor have I 100% concluded this is a bug in
test-case
, but I'm filing the issue as is in case the cause would be obvious to the maintainer.The text was updated successfully, but these errors were encountered: