Remove local variable check

This commit is contained in:
Devon Hollowood 2015-12-18 13:45:03 -08:00
parent 3533d3a223
commit 02cb24de82

View file

@ -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();