Skip to content

Commit

Permalink
Use exhaustive matching
Browse files Browse the repository at this point in the history
  • Loading branch information
petrochenkov committed Nov 10, 2015
1 parent ef68506 commit 41ccd44
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/librustc_privacy/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1094,7 +1094,10 @@ impl<'a, 'tcx> SanePrivacyVisitor<'a, 'tcx> {
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(..) => {}
}
}

Expand Down Expand Up @@ -1125,7 +1128,10 @@ impl<'a, 'tcx> SanePrivacyVisitor<'a, 'tcx> {
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(..) => {}
}
}
}
Expand Down

0 comments on commit 41ccd44

Please sign in to comment.