@@ -67,7 +67,7 @@ use syntax::ast::{Arm, BindingMode, Block, Crate, Expr, ExprKind};
6767use syntax:: ast:: { FnDecl , ForeignItem , ForeignItemKind , Generics } ;
6868use syntax:: ast:: { Item , ItemKind , ImplItem , ImplItemKind } ;
6969use syntax:: ast:: { Local , Pat , PatKind , Path } ;
70- use syntax:: ast:: { PathSegment , PathParameters , SelfKind , TraitItemKind , TraitRef , Ty , TyKind } ;
70+ use syntax:: ast:: { PathSegment , PathParameters , TraitItemKind , TraitRef , Ty , TyKind } ;
7171
7272use std:: collections:: { HashMap , HashSet } ;
7373use std:: cell:: { Cell , RefCell } ;
@@ -607,7 +607,7 @@ impl<'a, 'v> Visitor<'v> for Resolver<'a> {
607607 }
608608 FnKind :: Method ( _, sig, _) => {
609609 self . visit_generics ( & sig. generics ) ;
610- MethodRibKind ( sig. explicit_self . node == SelfKind :: Static )
610+ MethodRibKind ( ! sig. decl . has_self ( ) )
611611 }
612612 FnKind :: Closure => ClosureRibKind ( node_id) ,
613613 } ;
@@ -1676,9 +1676,7 @@ impl<'a> Resolver<'a> {
16761676 let type_parameters =
16771677 HasTypeParameters ( & sig. generics ,
16781678 FnSpace ,
1679- MethodRibKind (
1680- sig. explicit_self . node ==
1681- SelfKind :: Static ) ) ;
1679+ MethodRibKind ( !sig. decl . has_self ( ) ) ) ;
16821680 this. with_type_parameter_rib ( type_parameters, |this| {
16831681 visit:: walk_trait_item ( this, trait_item)
16841682 } ) ;
@@ -2007,9 +2005,7 @@ impl<'a> Resolver<'a> {
20072005 let type_parameters =
20082006 HasTypeParameters ( & sig. generics ,
20092007 FnSpace ,
2010- MethodRibKind (
2011- sig. explicit_self . node ==
2012- SelfKind :: Static ) ) ;
2008+ MethodRibKind ( !sig. decl . has_self ( ) ) ) ;
20132009 this. with_type_parameter_rib ( type_parameters, |this| {
20142010 visit:: walk_impl_item ( this, impl_item) ;
20152011 } ) ;
0 commit comments