about summary refs log tree commit diff
path: root/src/librustc_resolve
diff options
context:
space:
mode:
Diffstat (limited to 'src/librustc_resolve')
-rw-r--r--src/librustc_resolve/build_reduced_graph.rs2
-rw-r--r--src/librustc_resolve/def_collector.rs11
-rw-r--r--src/librustc_resolve/late.rs4
3 files changed, 7 insertions, 10 deletions
diff --git a/src/librustc_resolve/build_reduced_graph.rs b/src/librustc_resolve/build_reduced_graph.rs
index dc301375440..e94e0dc695c 100644
--- a/src/librustc_resolve/build_reduced_graph.rs
+++ b/src/librustc_resolve/build_reduced_graph.rs
@@ -1176,7 +1176,7 @@ impl<'a, 'b> Visitor<'b> for BuildReducedGraphVisitor<'a, 'b> {
         let item_def_id = self.r.definitions.local_def_id(item.id);
         let (res, ns) = match item.kind {
             AssocItemKind::Const(..) => (Res::Def(DefKind::AssocConst, item_def_id), ValueNS),
-            AssocItemKind::Method(ref sig, _) => {
+            AssocItemKind::Fn(ref sig, _) => {
                 if sig.decl.has_self() {
                     self.r.has_self.insert(item_def_id);
                 }
diff --git a/src/librustc_resolve/def_collector.rs b/src/librustc_resolve/def_collector.rs
index 6e26553d82f..9bae339f80e 100644
--- a/src/librustc_resolve/def_collector.rs
+++ b/src/librustc_resolve/def_collector.rs
@@ -214,11 +214,8 @@ impl<'a> visit::Visitor<'a> for DefCollector<'a> {
 
     fn visit_trait_item(&mut self, ti: &'a AssocItem) {
         let def_data = match ti.kind {
-            AssocItemKind::Method(..) | AssocItemKind::Const(..) =>
-                DefPathData::ValueNs(ti.ident.name),
-            AssocItemKind::TyAlias(..) => {
-                DefPathData::TypeNs(ti.ident.name)
-            },
+            AssocItemKind::Fn(..) | AssocItemKind::Const(..) => DefPathData::ValueNs(ti.ident.name),
+            AssocItemKind::TyAlias(..) => DefPathData::TypeNs(ti.ident.name),
             AssocItemKind::Macro(..) => return self.visit_macro_invoc(ti.id),
         };
 
@@ -228,7 +225,7 @@ impl<'a> visit::Visitor<'a> for DefCollector<'a> {
 
     fn visit_impl_item(&mut self, ii: &'a AssocItem) {
         let def_data = match ii.kind {
-            AssocItemKind::Method(FnSig {
+            AssocItemKind::Fn(FnSig {
                 ref header,
                 ref decl,
             }, ref body) if header.asyncness.node.is_async() => {
@@ -242,7 +239,7 @@ impl<'a> visit::Visitor<'a> for DefCollector<'a> {
                     body.as_deref(),
                 )
             }
-            AssocItemKind::Method(..) |
+            AssocItemKind::Fn(..) |
             AssocItemKind::Const(..) => DefPathData::ValueNs(ii.ident.name),
             AssocItemKind::TyAlias(..) => DefPathData::TypeNs(ii.ident.name),
             AssocItemKind::Macro(..) => return self.visit_macro_invoc(ii.id),
diff --git a/src/librustc_resolve/late.rs b/src/librustc_resolve/late.rs
index ad29fd9e1db..ec9c2a5b75d 100644
--- a/src/librustc_resolve/late.rs
+++ b/src/librustc_resolve/late.rs
@@ -818,7 +818,7 @@ impl<'a, 'b> LateResolutionVisitor<'a, '_> {
                                                     });
                                                 }
                                             }
-                                            AssocItemKind::Method(_, _) => {
+                                            AssocItemKind::Fn(_, _) => {
                                                 visit::walk_assoc_item(this, trait_item)
                                             }
                                             AssocItemKind::TyAlias(..) => {
@@ -1109,7 +1109,7 @@ impl<'a, 'b> LateResolutionVisitor<'a, '_> {
                                                     visit::walk_assoc_item(this, impl_item)
                                                 });
                                             }
-                                            AssocItemKind::Method(..) => {
+                                            AssocItemKind::Fn(..) => {
                                                 // If this is a trait impl, ensure the method
                                                 // exists in trait
                                                 this.check_trait_item(impl_item.ident,