Remove ForeignMod struct.
This commit is contained in:
parent
419a9186a4
commit
032f68d625
26 changed files with 69 additions and 85 deletions
|
@ -2284,12 +2284,6 @@ pub struct Mod<'hir> {
|
|||
pub item_ids: &'hir [ItemId],
|
||||
}
|
||||
|
||||
#[derive(Debug, HashStable_Generic)]
|
||||
pub struct ForeignMod<'hir> {
|
||||
pub abi: Abi,
|
||||
pub items: &'hir [ForeignItemRef<'hir>],
|
||||
}
|
||||
|
||||
#[derive(Encodable, Debug, HashStable_Generic)]
|
||||
pub struct GlobalAsm {
|
||||
pub asm: Symbol,
|
||||
|
@ -2536,7 +2530,7 @@ pub enum ItemKind<'hir> {
|
|||
/// A module.
|
||||
Mod(Mod<'hir>),
|
||||
/// An external module, e.g. `extern { .. }`.
|
||||
ForeignMod(ForeignMod<'hir>),
|
||||
ForeignMod { abi: Abi, items: &'hir [ForeignItemRef<'hir>] },
|
||||
/// Module-level inline assembly (from `global_asm!`).
|
||||
GlobalAsm(&'hir GlobalAsm),
|
||||
/// A type alias, e.g., `type Foo = Bar<u8>`.
|
||||
|
|
|
@ -589,9 +589,9 @@ pub fn walk_item<'v, V: Visitor<'v>>(visitor: &mut V, item: &'v Item<'v>) {
|
|||
// `visit_mod()` takes care of visiting the `Item`'s `HirId`.
|
||||
visitor.visit_mod(module, item.span, item.hir_id)
|
||||
}
|
||||
ItemKind::ForeignMod(ref foreign_module) => {
|
||||
ItemKind::ForeignMod { abi: _, items } => {
|
||||
visitor.visit_id(item.hir_id);
|
||||
walk_list!(visitor, visit_foreign_item_ref, foreign_module.items);
|
||||
walk_list!(visitor, visit_foreign_item_ref, items);
|
||||
}
|
||||
ItemKind::GlobalAsm(_) => {
|
||||
visitor.visit_id(item.hir_id);
|
||||
|
|
|
@ -91,7 +91,7 @@ impl Target {
|
|||
ItemKind::Const(..) => Target::Const,
|
||||
ItemKind::Fn(..) => Target::Fn,
|
||||
ItemKind::Mod(..) => Target::Mod,
|
||||
ItemKind::ForeignMod(..) => Target::ForeignMod,
|
||||
ItemKind::ForeignMod { .. } => Target::ForeignMod,
|
||||
ItemKind::GlobalAsm(..) => Target::GlobalAsm,
|
||||
ItemKind::TyAlias(..) => Target::TyAlias,
|
||||
ItemKind::OpaqueTy(..) => Target::OpaqueTy,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue