]> git.lizzy.rs Git - rust.git/commitdiff
Make unused lint ignore unused `!`
authorAndrew Cann <shum@canndrew.org>
Fri, 29 Jul 2016 11:20:57 +0000 (19:20 +0800)
committerAndrew Cann <shum@canndrew.org>
Sat, 13 Aug 2016 13:37:09 +0000 (21:37 +0800)
src/librustc_lint/unused.rs

index 4dc1a5e4f5e9f6dda3e8bc63fa9ffab1af28c15e..cd24de6a0a748a225beba109dfbf5d3d50828a6b 100644 (file)
@@ -133,6 +133,7 @@ fn check_stmt(&mut self, cx: &LateContext, s: &hir::Stmt) {
         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, _) => {