diff options
| author | A.J. Gardner <aaron.j.gardner@gmail.com> | 2017-03-16 22:16:40 -0500 |
|---|---|---|
| committer | A.J. Gardner <aaron.j.gardner@gmail.com> | 2017-04-12 19:12:49 -0500 |
| commit | 6bcd5b0980921a90367a3f8c4fbcd5b15fc4b3a5 (patch) | |
| tree | 2bda0102f4ee9873329afd9f94250c02e7963db8 | |
| parent | 768e9029413c6fa3857cf8ba7d943bb297a58ee3 (diff) | |
| download | rust-6bcd5b0980921a90367a3f8c4fbcd5b15fc4b3a5.tar.gz rust-6bcd5b0980921a90367a3f8c4fbcd5b15fc4b3a5.zip | |
Expand _ into explicit variants in match
| -rw-r--r-- | src/librustc_typeck/collect.rs | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/librustc_typeck/collect.rs b/src/librustc_typeck/collect.rs index a7f9b66f659..649353d52f6 100644 --- a/src/librustc_typeck/collect.rs +++ b/src/librustc_typeck/collect.rs @@ -490,8 +490,10 @@ fn convert_item<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, item_id: ast::NodeId) { let def_id = tcx.hir.local_def_id(item_id); match it.node { // These don't define types. - hir::ItemExternCrate(_) | hir::ItemUse(..) | hir::ItemMod(_) => { - } + hir::ItemExternCrate(_) | + hir::ItemUse(..) | + hir::ItemMod(_) | + hir::ItemGlobalAsm(_) => {} hir::ItemForeignMod(ref foreign_mod) => { for item in &foreign_mod.items { let def_id = tcx.hir.local_def_id(item.id); @@ -543,12 +545,12 @@ fn convert_item<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, item_id: ast::NodeId) { tcx.item_generics(def_id); tcx.item_type(def_id); tcx.item_predicates(def_id); - }, - _ => { + } + hir::ItemStatic(..) | hir::ItemConst(..) | hir::ItemFn(..) => { tcx.item_generics(def_id); tcx.item_type(def_id); tcx.item_predicates(def_id); - }, + } } } |
