@@ -43,7 +43,7 @@ use rustc_errors::Applicability;
4343use smallvec:: SmallVec ;
4444use syntax:: ast:: { self , LitKind } ;
4545use syntax:: attr;
46- use syntax:: ext:: hygiene:: ExpnFormat ;
46+ use syntax:: ext:: hygiene:: ExpnKind ;
4747use syntax:: source_map:: { Span , DUMMY_SP } ;
4848use syntax:: symbol:: { kw, Symbol } ;
4949
@@ -100,7 +100,7 @@ pub fn in_macro_or_desugar(span: Span) -> bool {
100100/// Returns `true` if this `expn_info` was expanded by any macro.
101101pub fn in_macro ( span : Span ) -> bool {
102102 if let Some ( info) = span. ctxt ( ) . outer_expn_info ( ) {
103- if let ExpnFormat :: CompilerDesugaring ( ..) = info. format {
103+ if let ExpnKind :: Desugaring ( ..) = info. kind {
104104 false
105105 } else {
106106 true
@@ -686,7 +686,7 @@ pub fn is_adjusted(cx: &LateContext<'_, '_>, e: &Expr) -> bool {
686686/// See also `is_direct_expn_of`.
687687pub fn is_expn_of ( mut span : Span , name : & str ) -> Option < Span > {
688688 loop {
689- let span_name_span = span. ctxt ( ) . outer_expn_info ( ) . map ( |ei| ( ei. format . name ( ) , ei. call_site ) ) ;
689+ let span_name_span = span. ctxt ( ) . outer_expn_info ( ) . map ( |ei| ( ei. kind . descr ( ) , ei. call_site ) ) ;
690690
691691 match span_name_span {
692692 Some ( ( mac_name, new_span) ) if mac_name. as_str ( ) == name => return Some ( new_span) ,
@@ -706,7 +706,7 @@ pub fn is_expn_of(mut span: Span, name: &str) -> Option<Span> {
706706/// `bar!` by
707707/// `is_direct_expn_of`.
708708pub fn is_direct_expn_of ( span : Span , name : & str ) -> Option < Span > {
709- let span_name_span = span. ctxt ( ) . outer_expn_info ( ) . map ( |ei| ( ei. format . name ( ) , ei. call_site ) ) ;
709+ let span_name_span = span. ctxt ( ) . outer_expn_info ( ) . map ( |ei| ( ei. kind . descr ( ) , ei. call_site ) ) ;
710710
711711 match span_name_span {
712712 Some ( ( mac_name, new_span) ) if mac_name. as_str ( ) == name => Some ( new_span) ,
0 commit comments