Remove ForeignMod struct.
This commit is contained in:
parent
419a9186a4
commit
032f68d625
26 changed files with 69 additions and 85 deletions
|
@ -190,7 +190,7 @@ impl<'tcx> MarkSymbolVisitor<'tcx> {
|
|||
|
||||
intravisit::walk_item(self, &item);
|
||||
}
|
||||
hir::ItemKind::ForeignMod(..) => {}
|
||||
hir::ItemKind::ForeignMod { .. } => {}
|
||||
_ => {
|
||||
intravisit::walk_item(self, &item);
|
||||
}
|
||||
|
|
|
@ -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(..)
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue