mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-17 05:25:37 +03:00
Use exhaustive matching
This commit is contained in:
@@ -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(..) => {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user