]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_resolve/src/def_collector.rs
RustWrapper: simplify removing attributes
[rust.git] / compiler / rustc_resolve / src / def_collector.rs
index 391baa85c61db99f0f85f63dce33f2065786521c..688b7b1a8c6d25593472d8beb5c436c1d5be0760 100644 (file)
@@ -92,6 +92,7 @@ fn visit_item(&mut self, i: &'a Item) {
         // information we encapsulate into, the better
         let def_data = match &i.kind {
             ItemKind::Impl { .. } => DefPathData::Impl,
+            ItemKind::ForeignMod(..) => DefPathData::ForeignMod,
             ItemKind::Mod(..)
             | ItemKind::Trait(..)
             | ItemKind::TraitAlias(..)
@@ -99,7 +100,6 @@ fn visit_item(&mut self, i: &'a Item) {
             | ItemKind::Struct(..)
             | ItemKind::Union(..)
             | ItemKind::ExternCrate(..)
-            | ItemKind::ForeignMod(..)
             | ItemKind::TyAlias(..) => DefPathData::TypeNs(i.ident.name),
             ItemKind::Static(..) | ItemKind::Const(..) | ItemKind::Fn(..) => {
                 DefPathData::ValueNs(i.ident.name)