Store invocation site for eager macros

This commit is contained in:
Jonas Schievink 2020-12-22 14:42:28 +01:00
parent b98ee075ee
commit 26f604b907
5 changed files with 52 additions and 28 deletions

View file

@ -563,6 +563,7 @@ mod tests {
let args = macro_call.token_tree().unwrap();
let parsed_args = mbe::ast_to_token_tree(&args).unwrap().0;
let call_id = AstId::new(file_id.into(), ast_id_map.ast_id(&macro_call));
let arg_id = db.intern_eager_expansion({
EagerCallLoc {
@ -570,7 +571,7 @@ mod tests {
fragment: FragmentKind::Expr,
subtree: Arc::new(parsed_args.clone()),
krate,
file_id: file_id.into(),
call: call_id,
}
});
@ -580,7 +581,7 @@ mod tests {
fragment,
subtree: Arc::new(subtree),
krate,
file_id: file_id.into(),
call: call_id,
};
let id: MacroCallId = db.intern_eager_expansion(eager).into();