@@ -230,13 +230,13 @@ enum MacroDirectiveKind {
230
230
FnLike {
231
231
ast_id : AstIdWithPath < ast:: MacroCall > ,
232
232
expand_to : ExpandTo ,
233
- call_site : Span ,
233
+ ctxt : SyntaxContextId ,
234
234
} ,
235
235
Derive {
236
236
ast_id : AstIdWithPath < ast:: Adt > ,
237
237
derive_attr : AttrId ,
238
238
derive_pos : usize ,
239
- call_site : Span ,
239
+ ctxt : SyntaxContextId ,
240
240
} ,
241
241
Attr {
242
242
ast_id : AstIdWithPath < ast:: Item > ,
@@ -1126,7 +1126,7 @@ impl DefCollector<'_> {
1126
1126
let resolver_def_id = |path| resolver ( path) . map ( |( _, it) | it) ;
1127
1127
1128
1128
match & directive. kind {
1129
- MacroDirectiveKind :: FnLike { ast_id, expand_to, call_site } => {
1129
+ MacroDirectiveKind :: FnLike { ast_id, expand_to, ctxt : call_site } => {
1130
1130
let call_id = macro_call_as_call_id (
1131
1131
self . db . upcast ( ) ,
1132
1132
ast_id,
@@ -1146,7 +1146,7 @@ impl DefCollector<'_> {
1146
1146
return Resolved :: Yes ;
1147
1147
}
1148
1148
}
1149
- MacroDirectiveKind :: Derive { ast_id, derive_attr, derive_pos, call_site } => {
1149
+ MacroDirectiveKind :: Derive { ast_id, derive_attr, derive_pos, ctxt : call_site } => {
1150
1150
let id = derive_macro_as_call_id (
1151
1151
self . db ,
1152
1152
ast_id,
@@ -1266,7 +1266,7 @@ impl DefCollector<'_> {
1266
1266
ast_id,
1267
1267
derive_attr : attr. id ,
1268
1268
derive_pos : idx,
1269
- call_site,
1269
+ ctxt : call_site. ctx ,
1270
1270
} ,
1271
1271
container : directive. container ,
1272
1272
} ) ;
@@ -1428,7 +1428,7 @@ impl DefCollector<'_> {
1428
1428
1429
1429
for directive in & self . unresolved_macros {
1430
1430
match & directive. kind {
1431
- MacroDirectiveKind :: FnLike { ast_id, expand_to, call_site } => {
1431
+ MacroDirectiveKind :: FnLike { ast_id, expand_to, ctxt : call_site } => {
1432
1432
// FIXME: we shouldn't need to re-resolve the macro here just to get the unresolved error!
1433
1433
let macro_call_as_call_id = macro_call_as_call_id (
1434
1434
self . db . upcast ( ) ,
@@ -1460,7 +1460,7 @@ impl DefCollector<'_> {
1460
1460
) ) ;
1461
1461
}
1462
1462
}
1463
- MacroDirectiveKind :: Derive { ast_id, derive_attr, derive_pos, call_site : _ } => {
1463
+ MacroDirectiveKind :: Derive { ast_id, derive_attr, derive_pos, ctxt : _ } => {
1464
1464
self . def_map . diagnostics . push ( DefDiagnostic :: unresolved_macro_call (
1465
1465
directive. module_id ,
1466
1466
MacroCallKind :: Derive {
@@ -2289,7 +2289,7 @@ impl ModCollector<'_, '_> {
2289
2289
2290
2290
fn collect_macro_call (
2291
2291
& mut self ,
2292
- & MacroCall { ref path, ast_id, expand_to, call_site } : & MacroCall ,
2292
+ & MacroCall { ref path, ast_id, expand_to, ctxt } : & MacroCall ,
2293
2293
container : ItemContainerId ,
2294
2294
) {
2295
2295
let ast_id = AstIdWithPath :: new ( self . file_id ( ) , ast_id, ModPath :: clone ( path) ) ;
@@ -2303,7 +2303,7 @@ impl ModCollector<'_, '_> {
2303
2303
if let Ok ( res) = macro_call_as_call_id_with_eager (
2304
2304
db. upcast ( ) ,
2305
2305
& ast_id,
2306
- call_site ,
2306
+ ctxt ,
2307
2307
expand_to,
2308
2308
self . def_collector . def_map . krate ,
2309
2309
|path| {
@@ -2361,7 +2361,7 @@ impl ModCollector<'_, '_> {
2361
2361
self . def_collector . unresolved_macros . push ( MacroDirective {
2362
2362
module_id : self . module_id ,
2363
2363
depth : self . macro_depth + 1 ,
2364
- kind : MacroDirectiveKind :: FnLike { ast_id, expand_to, call_site } ,
2364
+ kind : MacroDirectiveKind :: FnLike { ast_id, expand_to, ctxt } ,
2365
2365
container,
2366
2366
} ) ;
2367
2367
}
0 commit comments