-
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
let_and_return : false positive #1642
Comments
The following block added in use std::collections::HashMap;
fn vecto() -> Vec<u32> {
#![allow(unreadable_literal)]
let mut h = HashMap::new();
h.insert(1000, 3);
h.insert(10000, 4);
h.drain().map(|(_, v)| v).collect()
//let r = h.drain().map(|(_, v)| v).collect();
//r
}
fn main() {
let v = vecto();
println!("{:?}", v);
} |
@montrivo: I cannot confirm this. It is still broken on nightly: https://play.rust-lang.org/?gist=fa10281cc3811a555cda285c819db964&version=nightly |
Ok. Are the test files somehow not thoroughly compiled? |
If an error happens in the AST, no HIR lints are reported |
This issue can be closed as the suggestion builds in current stable, see here EDIT: invalid link |
false positive for let and return (possible linked to #848)
commented version works but generate clippy's warning.
given version does not compile:
source code:
The text was updated successfully, but these errors were encountered: