-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Lints sometimes don't trigger, with no discernable pattern #46695
Comments
This is potentially a more general report of #46164 |
Both I should also add, the "reachable" set is very unreliable for crates defining macros 2.0, but it doesn't seem to be relevant for the linked Diesel crate. |
This is an item which is 100% reachable from outside the crate. I've also observed this with lints unrelated to public items, such as random lints from clippy -- I can try to pull up some examples, I've only noticed those when they randomly start failing for no apparent reason |
Here's another example: https://github.com/diesel-rs/diesel/pull/1350/files#diff-ed7f6c154205d63bf776e00598c41eb9 The only code that changed is some imports, as a trait got renamed. The method being referenced is fundamentally unchanged, and is also irrelevant to this lint that suddenly started triggering. This lint should have always been failing. Glancing through the source of that lint in clippy, I don't see any filtering there that would have changed as a result of this code change. |
This lint (missing_copy_implementations) no longer seems to trigger in more recent version of Rust. Some issues [#46695][1] seem to indicate that this is based on detection of externally visible types that might have improved—note that the types in question are private to their module. It should not be any risk to add this impl as it is not externally visible. Consider the scenario where the types are made public by extracting the modules into their own crate. In this case, the discussion on the exhaustiveness of these representations will need to occur in any case and be more SemVer restrictive than the Copy impl. [1]: (rust-lang/rust#46695)
Hi @sgrif, is this still happening on latest stable/nightly? |
This has cropped up in Diesel for a long time, either manifesting as having to change some unrelated code because a lint started triggering that wasn't before, or occasionally noticing "oh hey you need to implement
Copy
on this type, why didn't the lint trigger?"I finally have a case that I can report though, which I noticed before it started failing, and very clearly should be triggering. diesel-rs/diesel#1375 adds
#[deny(missing_docs)]
to thequery_dsl
module. However,query_dsl::boxed_dsl::BoxedDsl
is a public item which has no documentation on it, and should be triggering the lint. I can even go in and add#[deny(missing_docs)]
to that trait directly, and the lint still doesn't fire.I'm not sure what other information I can add -- This is not specific to this one lint in this one case, we've had tons of cases of lints which should have always been failing randomly starting to fail due to changes in completely unrelated code.
The text was updated successfully, but these errors were encountered: