Skip to content

Commit

Permalink
Expand _ into explicit variants in match
Browse files Browse the repository at this point in the history
  • Loading branch information
mrhota committed Mar 17, 2017
1 parent 9e61d5c commit 817298a
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/librustc_typeck/collect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
},
}
}
}

Expand Down

0 comments on commit 817298a

Please sign in to comment.