-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
needless_collect: spans are off by one #7200
Labels
C-bug
Category: Clippy is not doing the correct thing
Comments
Do you have a reproducible example? |
Ok I just saw, what is seven more strange is that the lint suggestion duplicates the
|
Here's stand alone repro of the strange spans: use std::path::PathBuf;
fn main() {
let required_crates = vec![];
let required_crates: Vec<_> = required_crates.into_iter().collect();
let _ = vec![1, 2, 3]
.iter()
.filter(|x| !required_crates.contains(&PathBuf::new()));
}
there's really something odd with these spans :D |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Looks like the spans are a bit off in the lower message?
I'm not sure if this is a clippy lint bug or a rustc diasgnostics bug.
The text was updated successfully, but these errors were encountered: