Make unused lint ignore unused !

This commit is contained in:
Andrew Cann 2016-07-29 19:20:57 +08:00
parent f31d9757f8
commit 082915290d

View file

@ -133,6 +133,7 @@ impl LateLintPass for UnusedResults {
let t = cx.tcx.expr_ty(&expr);
let warned = match t.sty {
ty::TyTuple(ref tys) if tys.is_empty() => return,
ty::TyEmpty => return,
ty::TyBool => return,
ty::TyStruct(def, _) |
ty::TyEnum(def, _) => {