]> git.lizzy.rs Git - rust.git/commitdiff
Fix rebase
authorVadim Petrochenkov <vadim.petrochenkov@gmail.com>
Sun, 6 Mar 2016 12:54:44 +0000 (15:54 +0300)
committerVadim Petrochenkov <vadim.petrochenkov@gmail.com>
Wed, 25 May 2016 19:17:58 +0000 (22:17 +0300)
src/librustc_resolve/lib.rs

index 41cc546281649cb5072e16f783ad182fce9aa8a2..215109f282d926a9daf1ee9e22e83316c2abc2c0 100644 (file)
@@ -67,7 +67,7 @@
 use syntax::ast::{FnDecl, ForeignItem, ForeignItemKind, Generics};
 use syntax::ast::{Item, ItemKind, ImplItem, ImplItemKind};
 use syntax::ast::{Local, Pat, PatKind, Path};
-use syntax::ast::{PathSegment, PathParameters, SelfKind, TraitItemKind, TraitRef, Ty, TyKind};
+use syntax::ast::{PathSegment, PathParameters, TraitItemKind, TraitRef, Ty, TyKind};
 
 use std::collections::{HashMap, HashSet};
 use std::cell::{Cell, RefCell};
@@ -607,7 +607,7 @@ fn visit_fn(&mut self,
             }
             FnKind::Method(_, sig, _) => {
                 self.visit_generics(&sig.generics);
-                MethodRibKind(sig.explicit_self.node == SelfKind::Static)
+                MethodRibKind(!sig.decl.has_self())
             }
             FnKind::Closure => ClosureRibKind(node_id),
         };
@@ -1676,9 +1676,7 @@ fn resolve_item(&mut self, item: &Item) {
                                     let type_parameters =
                                         HasTypeParameters(&sig.generics,
                                                           FnSpace,
-                                                          MethodRibKind(
-                                                             sig.explicit_self.node ==
-                                                             SelfKind::Static));
+                                                          MethodRibKind(!sig.decl.has_self()));
                                     this.with_type_parameter_rib(type_parameters, |this| {
                                         visit::walk_trait_item(this, trait_item)
                                     });
@@ -2007,9 +2005,7 @@ fn resolve_implementation(&mut self,
                                     let type_parameters =
                                         HasTypeParameters(&sig.generics,
                                                           FnSpace,
-                                                          MethodRibKind(
-                                                            sig.explicit_self.node ==
-                                                            SelfKind::Static));
+                                                          MethodRibKind(!sig.decl.has_self()));
                                     this.with_type_parameter_rib(type_parameters, |this| {
                                         visit::walk_impl_item(this, impl_item);
                                     });