@@ -67,7 +67,7 @@ use syntax::ast::{Arm, BindingMode, Block, Crate, Expr, ExprKind};
67
67
use syntax:: ast:: { FnDecl , ForeignItem , ForeignItemKind , Generics } ;
68
68
use syntax:: ast:: { Item , ItemKind , ImplItem , ImplItemKind } ;
69
69
use 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 } ;
71
71
72
72
use std:: collections:: { HashMap , HashSet } ;
73
73
use std:: cell:: { Cell , RefCell } ;
@@ -607,7 +607,7 @@ impl<'a, 'v> Visitor<'v> for Resolver<'a> {
607
607
}
608
608
FnKind :: Method ( _, sig, _) => {
609
609
self . visit_generics ( & sig. generics ) ;
610
- MethodRibKind ( sig. explicit_self . node == SelfKind :: Static )
610
+ MethodRibKind ( ! sig. decl . has_self ( ) )
611
611
}
612
612
FnKind :: Closure => ClosureRibKind ( node_id) ,
613
613
} ;
@@ -1676,9 +1676,7 @@ impl<'a> Resolver<'a> {
1676
1676
let type_parameters =
1677
1677
HasTypeParameters ( & sig. generics ,
1678
1678
FnSpace ,
1679
- MethodRibKind (
1680
- sig. explicit_self . node ==
1681
- SelfKind :: Static ) ) ;
1679
+ MethodRibKind ( !sig. decl . has_self ( ) ) ) ;
1682
1680
this. with_type_parameter_rib ( type_parameters, |this| {
1683
1681
visit:: walk_trait_item ( this, trait_item)
1684
1682
} ) ;
@@ -2007,9 +2005,7 @@ impl<'a> Resolver<'a> {
2007
2005
let type_parameters =
2008
2006
HasTypeParameters ( & sig. generics ,
2009
2007
FnSpace ,
2010
- MethodRibKind (
2011
- sig. explicit_self . node ==
2012
- SelfKind :: Static ) ) ;
2008
+ MethodRibKind ( !sig. decl . has_self ( ) ) ) ;
2013
2009
this. with_type_parameter_rib ( type_parameters, |this| {
2014
2010
visit:: walk_impl_item ( this, impl_item) ;
2015
2011
} ) ;
0 commit comments