Use exhaustive matching

This commit is contained in:
Vadim Petrochenkov
2015-11-10 12:51:56 +03:00
parent ef6850643e
commit 41ccd44f76
+8 -2
View File
@@ -1094,7 +1094,10 @@ fn check_sane_privacy(&self, item: &hir::Item) {
check_inherited(item.span, item.vis,
"place qualifiers on individual functions instead");
}
_ => {}
hir::ItemStruct(..) | hir::ItemEnum(..) | hir::ItemTrait(..) |
hir::ItemConst(..) | hir::ItemStatic(..) | hir::ItemFn(..) |
hir::ItemMod(..) | hir::ItemExternCrate(..) |
hir::ItemUse(..) | hir::ItemTy(..) => {}
}
}
@@ -1125,7 +1128,10 @@ fn check_all_inherited(&self, item: &hir::Item) {
check_inherited(f.span, f.node.kind.visibility());
}
}
_ => {}
hir::ItemDefaultImpl(..) | hir::ItemEnum(..) | hir::ItemTrait(..) |
hir::ItemConst(..) | hir::ItemStatic(..) | hir::ItemFn(..) |
hir::ItemMod(..) | hir::ItemExternCrate(..) |
hir::ItemUse(..) | hir::ItemTy(..) => {}
}
}
}