about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAndrew Cann <shum@canndrew.org>2016-07-29 19:20:57 +0800
committerAndrew Cann <shum@canndrew.org>2016-08-13 21:37:09 +0800
commit082915290da2619ecc9528fb6af3fae2a9d8e997 (patch)
tree6ace424bde89a28a8a1526ffc12d02cfedf2d33d
parentf31d9757f8a49fde0b7b6a6698d967bb0b1561fe (diff)
Make unused lint ignore unused `!`
-rw-r--r--src/librustc_lint/unused.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/librustc_lint/unused.rs b/src/librustc_lint/unused.rs
index 4dc1a5e4f5e..cd24de6a0a7 100644
--- a/src/librustc_lint/unused.rs
+++ b/src/librustc_lint/unused.rs
@@ -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, _) => {