Expand _ into explicit variants in match
This commit is contained in:
parent
768e902941
commit
6bcd5b0980
@ -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);
|
let def_id = tcx.hir.local_def_id(item_id);
|
||||||
match it.node {
|
match it.node {
|
||||||
// These don't define types.
|
// These don't define types.
|
||||||
hir::ItemExternCrate(_) | hir::ItemUse(..) | hir::ItemMod(_) => {
|
hir::ItemExternCrate(_) |
|
||||||
}
|
hir::ItemUse(..) |
|
||||||
|
hir::ItemMod(_) |
|
||||||
|
hir::ItemGlobalAsm(_) => {}
|
||||||
hir::ItemForeignMod(ref foreign_mod) => {
|
hir::ItemForeignMod(ref foreign_mod) => {
|
||||||
for item in &foreign_mod.items {
|
for item in &foreign_mod.items {
|
||||||
let def_id = tcx.hir.local_def_id(item.id);
|
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_generics(def_id);
|
||||||
tcx.item_type(def_id);
|
tcx.item_type(def_id);
|
||||||
tcx.item_predicates(def_id);
|
tcx.item_predicates(def_id);
|
||||||
},
|
}
|
||||||
_ => {
|
hir::ItemStatic(..) | hir::ItemConst(..) | hir::ItemFn(..) => {
|
||||||
tcx.item_generics(def_id);
|
tcx.item_generics(def_id);
|
||||||
tcx.item_type(def_id);
|
tcx.item_type(def_id);
|
||||||
tcx.item_predicates(def_id);
|
tcx.item_predicates(def_id);
|
||||||
},
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user