@@ -26,8 +26,7 @@ use util::nodemap::{NodeMap, NodeSet};
2626
2727use  syntax:: ast; 
2828use  syntax:: ast_map; 
29- use  syntax:: ast_util; 
30- use  syntax:: ast_util:: { is_local,  local_def} ; 
29+ use  syntax:: ast_util:: { is_local,  local_def,  PostExpansionMethod } ; 
3130use  syntax:: attr; 
3231use  syntax:: codemap:: Span ; 
3332use  syntax:: parse:: token; 
@@ -264,10 +263,10 @@ impl<'a> Visitor<()> for EmbargoVisitor<'a> {
264263
265264                if  public_ty || public_trait { 
266265                    for  method in  methods. iter ( )  { 
267-                         let  meth_public = match  ast_util :: method_explicit_self ( & * * method) . node  { 
266+                         let  meth_public = match  method. pe_explicit_self ( ) . node  { 
268267                            ast:: SelfStatic  => public_ty, 
269268                            _ => true , 
270-                         }  && ast_util :: method_vis ( & * * method)  == ast:: Public ; 
269+                         }  && method. pe_vis ( )  == ast:: Public ; 
271270                        if  meth_public || tr. is_some ( )  { 
272271                            self . exported_items . insert ( method. id ) ; 
273272                        } 
@@ -457,8 +456,8 @@ impl<'a> PrivacyVisitor<'a> {
457456                    let  imp = self . tcx . map . get_parent_did ( closest_private_id) ; 
458457                    match  ty:: impl_trait_ref ( self . tcx ,  imp)  { 
459458                        Some ( ..)  => return  Allowable , 
460-                         _ if  ast_util :: method_vis ( & * * m )  == ast:: Public  => return  Allowable , 
461-                         _ => ast_util :: method_vis ( & * * m ) 
459+                         _ if  m . pe_vis ( )  == ast:: Public  => return  Allowable , 
460+                         _ => m . pe_vis ( ) 
462461                    } 
463462                } 
464463                Some ( ast_map:: NodeTraitMethod ( _) )  => { 
@@ -1079,7 +1078,7 @@ impl<'a> SanePrivacyVisitor<'a> {
10791078                                "visibility qualifiers have no effect on trait \  
10801079) ; 
10811080                for  m in  methods. iter ( )  { 
1082-                     check_inherited ( m. span ,  ast_util :: method_vis ( & * * m ) ,  "" ) ; 
1081+                     check_inherited ( m. span ,  m . pe_vis ( ) ,  "" ) ; 
10831082                } 
10841083            } 
10851084
@@ -1111,7 +1110,7 @@ impl<'a> SanePrivacyVisitor<'a> {
11111110                for  m in  methods. iter ( )  { 
11121111                    match  * m { 
11131112                        ast:: Provided ( ref  m)  => { 
1114-                             check_inherited ( m. span ,  ast_util :: method_vis ( & * * m ) , 
1113+                             check_inherited ( m. span ,  m . pe_vis ( ) , 
11151114                                            "unnecessary visibility" ) ; 
11161115                        } 
11171116                        ast:: Required ( ref  m)  => { 
@@ -1149,7 +1148,7 @@ impl<'a> SanePrivacyVisitor<'a> {
11491148        match  item. node  { 
11501149            ast:: ItemImpl ( _,  _,  _,  ref  methods)  => { 
11511150                for  m in  methods. iter ( )  { 
1152-                     check_inherited ( tcx,  m. span ,  ast_util :: method_vis ( & * * m ) ) ; 
1151+                     check_inherited ( tcx,  m. span ,  m . pe_vis ( ) ) ; 
11531152                } 
11541153            } 
11551154            ast:: ItemForeignMod ( ref  fm)  => { 
@@ -1175,7 +1174,7 @@ impl<'a> SanePrivacyVisitor<'a> {
11751174                    match  * m { 
11761175                        ast:: Required ( ..)  => { } 
11771176                        ast:: Provided ( ref  m)  => check_inherited ( tcx,  m. span , 
1178-                                                                 ast_util :: method_vis ( & * * m ) ) , 
1177+                                                                 m . pe_vis ( ) ) , 
11791178                    } 
11801179                } 
11811180            } 
@@ -1345,7 +1344,7 @@ impl<'a> Visitor<()> for VisiblePrivateTypesVisitor<'a> {
13451344                    // methods will be visible as `Public::foo`. 
13461345                    let  mut  found_pub_static = false ; 
13471346                    for  method in  methods. iter ( )  { 
1348-                         if  ast_util :: method_explicit_self ( & * * method) . node  == ast:: SelfStatic  &&
1347+                         if  method. pe_explicit_self ( ) . node  == ast:: SelfStatic  &&
13491348                            self . exported_items . contains ( & method. id )  { 
13501349                            found_pub_static = true ; 
13511350                            visit:: walk_method_helper ( self ,  & * * method,  ( ) ) ; 
0 commit comments