@@ -23,7 +23,10 @@ use crate::{
23
23
builtin_attr_macro:: pseudo_derive_attr_expansion,
24
24
builtin_fn_macro:: EagerExpander ,
25
25
fixup:: { self , reverse_fixups, SyntaxFixupUndoInfo } ,
26
- hygiene:: { apply_mark, SyntaxContextData , Transparency } ,
26
+ hygiene:: {
27
+ apply_mark, span_with_call_site_ctxt, span_with_def_site_ctxt, span_with_mixed_site_ctxt,
28
+ SyntaxContextData , Transparency ,
29
+ } ,
27
30
proc_macro:: ProcMacros ,
28
31
span_map:: { RealSpanMap , SpanMap , SpanMapRef } ,
29
32
tt, AstId , BuiltinAttrExpander , BuiltinDeriveExpander , BuiltinFnLikeExpander ,
@@ -307,9 +310,9 @@ pub fn expand_speculative(
307
310
loc. krate ,
308
311
& tt,
309
312
attr_arg. as_ref ( ) ,
310
- loc. call_site ,
311
- loc. call_site ,
312
- loc. call_site ,
313
+ span_with_def_site_ctxt ( db , loc. def . span , actual_macro_call ) ,
314
+ span_with_call_site_ctxt ( db , loc. def . span , actual_macro_call ) ,
315
+ span_with_mixed_site_ctxt ( db , loc. def . span , actual_macro_call ) ,
313
316
)
314
317
}
315
318
MacroDefKind :: BuiltInAttr ( BuiltinAttrExpander :: Derive , _) => {
@@ -787,11 +790,9 @@ fn expand_proc_macro(db: &dyn ExpandDatabase, id: MacroCallId) -> ExpandResult<A
787
790
loc. krate ,
788
791
& macro_arg,
789
792
attr_arg,
790
- // FIXME
791
- loc. call_site ,
792
- loc. call_site ,
793
- // FIXME
794
- loc. call_site ,
793
+ span_with_def_site_ctxt ( db, loc. def . span , id) ,
794
+ span_with_call_site_ctxt ( db, loc. def . span , id) ,
795
+ span_with_mixed_site_ctxt ( db, loc. def . span , id) ,
795
796
) ;
796
797
797
798
// Set a hard limit for the expanded tt
0 commit comments