Remove ForeignMod struct.
This commit is contained in:
parent
419a9186a4
commit
032f68d625
26 changed files with 69 additions and 85 deletions
|
|
@ -240,8 +240,8 @@ impl<'a, 'tcx> RustdocVisitor<'a, 'tcx> {
|
|||
}
|
||||
|
||||
match item.kind {
|
||||
hir::ItemKind::ForeignMod(ref fm) => {
|
||||
for item in fm.items {
|
||||
hir::ItemKind::ForeignMod { items, .. } => {
|
||||
for item in items {
|
||||
let item = self.cx.tcx.hir().foreign_item(item.id);
|
||||
self.visit_foreign_item(item, None, om);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -147,7 +147,7 @@ impl<'tcx> LateLintPass<'tcx> for MissingDoc {
|
|||
hir::ItemKind::Union(..) => "a union",
|
||||
hir::ItemKind::OpaqueTy(..) => "an existential type",
|
||||
hir::ItemKind::ExternCrate(..)
|
||||
| hir::ItemKind::ForeignMod(..)
|
||||
| hir::ItemKind::ForeignMod { .. }
|
||||
| hir::ItemKind::GlobalAsm(..)
|
||||
| hir::ItemKind::Impl { .. }
|
||||
| hir::ItemKind::Use(..) => return,
|
||||
|
|
|
|||
|
|
@ -125,7 +125,7 @@ impl<'tcx> LateLintPass<'tcx> for MissingInline {
|
|||
| hir::ItemKind::Union(..)
|
||||
| hir::ItemKind::OpaqueTy(..)
|
||||
| hir::ItemKind::ExternCrate(..)
|
||||
| hir::ItemKind::ForeignMod(..)
|
||||
| hir::ItemKind::ForeignMod { .. }
|
||||
| hir::ItemKind::Impl { .. }
|
||||
| hir::ItemKind::Use(..) => {},
|
||||
};
|
||||
|
|
|
|||
|
|
@ -395,7 +395,7 @@ fn print_item(cx: &LateContext<'_>, item: &hir::Item<'_>) {
|
|||
println!("function of type {:#?}", item_ty);
|
||||
},
|
||||
hir::ItemKind::Mod(..) => println!("module"),
|
||||
hir::ItemKind::ForeignMod(ref fm) => println!("foreign module with abi: {}", fm.abi),
|
||||
hir::ItemKind::ForeignMod { abi, .. } => println!("foreign module with abi: {}", abi),
|
||||
hir::ItemKind::GlobalAsm(ref asm) => println!("global asm: {:?}", asm),
|
||||
hir::ItemKind::TyAlias(..) => {
|
||||
println!("type alias for {:?}", cx.tcx.type_of(did));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue