1
Fork 0

Remove ForeignMod struct.

This commit is contained in:
Camille GILLOT 2020-11-11 22:40:09 +01:00
parent 419a9186a4
commit 032f68d625
26 changed files with 69 additions and 85 deletions

View file

@ -190,7 +190,7 @@ impl<'tcx> MarkSymbolVisitor<'tcx> {
intravisit::walk_item(self, &item);
}
hir::ItemKind::ForeignMod(..) => {}
hir::ItemKind::ForeignMod { .. } => {}
_ => {
intravisit::walk_item(self, &item);
}

View file

@ -262,7 +262,7 @@ impl<'tcx> ReachableContext<'tcx> {
| hir::ItemKind::TyAlias(..)
| hir::ItemKind::Static(..)
| hir::ItemKind::Mod(..)
| hir::ItemKind::ForeignMod(..)
| hir::ItemKind::ForeignMod { .. }
| hir::ItemKind::Impl { .. }
| hir::ItemKind::Trait(..)
| hir::ItemKind::TraitAlias(..)

View file

@ -326,7 +326,7 @@ impl<'a, 'tcx> Visitor<'tcx> for Annotator<'a, 'tcx> {
// they don't have their own stability. They still can be annotated as unstable
// and propagate this unstability to children, but this annotation is completely
// optional. They inherit stability from their parents when unannotated.
hir::ItemKind::Impl { of_trait: None, .. } | hir::ItemKind::ForeignMod(..) => {
hir::ItemKind::Impl { of_trait: None, .. } | hir::ItemKind::ForeignMod { .. } => {
self.in_trait_impl = false;
kind = AnnotationKind::Container;
}
@ -499,7 +499,7 @@ impl<'tcx> Visitor<'tcx> for MissingStabilityAnnotations<'tcx> {
// optional. They inherit stability from their parents when unannotated.
if !matches!(
i.kind,
hir::ItemKind::Impl { of_trait: None, .. } | hir::ItemKind::ForeignMod(..)
hir::ItemKind::Impl { of_trait: None, .. } | hir::ItemKind::ForeignMod{..}
) {
self.check_missing_stability(i.hir_id, i.span);
}