@@ -57,7 +57,7 @@ pub fn in_constant(cx: &LateContext, id: NodeId) -> bool {
57
57
/// Returns true if this `expn_info` was expanded by any macro.
58
58
pub fn in_macro ( span : Span ) -> bool {
59
59
span. ctxt ( ) . outer ( ) . expn_info ( ) . map_or ( false , |info| {
60
- match info. callee . format {
60
+ match info. format {
61
61
// don't treat range expressions desugared to structs as "in_macro"
62
62
ExpnFormat :: CompilerDesugaring ( kind) => kind != CompilerDesugaringKind :: DotFill ,
63
63
_ => true ,
@@ -68,7 +68,7 @@ pub fn in_macro(span: Span) -> bool {
68
68
/// Returns true if `expn_info` was expanded by range expressions.
69
69
pub fn is_range_expression ( span : Span ) -> bool {
70
70
span. ctxt ( ) . outer ( ) . expn_info ( ) . map_or ( false , |info| {
71
- match info. callee . format {
71
+ match info. format {
72
72
ExpnFormat :: CompilerDesugaring ( CompilerDesugaringKind :: DotFill ) => true ,
73
73
_ => false ,
74
74
}
@@ -84,12 +84,12 @@ pub fn in_external_macro<'a, T: LintContext<'a>>(cx: &T, span: Span) -> bool {
84
84
/// this after other checks have already happened.
85
85
fn in_macro_ext < ' a , T : LintContext < ' a > > ( cx : & T , info : & ExpnInfo ) -> bool {
86
86
// no ExpnInfo = no macro
87
- if let ExpnFormat :: MacroAttribute ( ..) = info. callee . format {
87
+ if let ExpnFormat :: MacroAttribute ( ..) = info. format {
88
88
// these are all plugins
89
89
return true ;
90
90
}
91
91
// no span for the callee = external macro
92
- info. callee . span . map_or ( true , |span| {
92
+ info. def_site . map_or ( true , |span| {
93
93
// no snippet = external macro or compiler-builtin expansion
94
94
cx. sess ( )
95
95
. codemap ( )
@@ -768,7 +768,7 @@ pub fn is_expn_of(mut span: Span, name: &str) -> Option<Span> {
768
768
let span_name_span = span. ctxt ( )
769
769
. outer ( )
770
770
. expn_info ( )
771
- . map ( |ei| ( ei. callee . name ( ) , ei. call_site ) ) ;
771
+ . map ( |ei| ( ei. format . name ( ) , ei. call_site ) ) ;
772
772
773
773
match span_name_span {
774
774
Some ( ( mac_name, new_span) ) if mac_name == name => return Some ( new_span) ,
@@ -791,7 +791,7 @@ pub fn is_direct_expn_of(span: Span, name: &str) -> Option<Span> {
791
791
let span_name_span = span. ctxt ( )
792
792
. outer ( )
793
793
. expn_info ( )
794
- . map ( |ei| ( ei. callee . name ( ) , ei. call_site ) ) ;
794
+ . map ( |ei| ( ei. format . name ( ) , ei. call_site ) ) ;
795
795
796
796
match span_name_span {
797
797
Some ( ( mac_name, new_span) ) if mac_name == name => Some ( new_span) ,
0 commit comments