mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-15 16:33:49 +00:00
Remove local variable check
This commit is contained in:
parent
3533d3a223
commit
02cb24de82
@ -362,7 +362,6 @@ impl LateLintPass for UsedUnderscoreBinding {
|
||||
ident.name.as_str().chars().next() == Some('_') //starts with '_'
|
||||
&& ident.name.as_str().chars().skip(1).next() != Some('_') //doesn't start with "__"
|
||||
&& ident.name != ident.unhygienic_name //not in macro
|
||||
&& cx.tcx.def_map.borrow().contains_key(&expr.id) //local variable
|
||||
},
|
||||
ExprField(_, spanned) => {
|
||||
let name = spanned.node.as_str();
|
||||
|
Loading…
Reference in New Issue
Block a user