File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -1142,8 +1142,8 @@ pub type ExplicitSelf = Spanned<SelfKind>;
11421142
11431143impl Arg {
11441144 pub fn to_self ( & self ) -> Option < ExplicitSelf > {
1145- if let PatKind :: Ident ( BindByValue ( mutbl) , ident , _) = self . pat . node {
1146- if ident . node . unhygienic_name == keywords:: SelfValue . name ( ) {
1145+ if let PatKind :: Ident ( BindByValue ( mutbl) , name , _) = self . pat . node {
1146+ if name . node . unhygienize ( ) == keywords:: SelfValue . name ( ) {
11471147 return match self . ty . node {
11481148 TyInfer => Some ( respan ( self . pat . span , SelfKind :: Value ( mutbl) ) ) ,
11491149 TyRptr ( lt, MutTy { ref ty, mutbl} ) if ty. node == TyInfer => {
@@ -1158,8 +1158,8 @@ impl Arg {
11581158 }
11591159
11601160 pub fn is_self ( & self ) -> bool {
1161- if let PatKind :: Ident ( _, ident , _) = self . pat . node {
1162- ident . node . unhygienic_name == keywords:: SelfValue . name ( )
1161+ if let PatKind :: Ident ( _, name , _) = self . pat . node {
1162+ name . node . unhygienize ( ) == keywords:: SelfValue . name ( )
11631163 } else {
11641164 false
11651165 }
You can’t perform that action at this time.
0 commit comments