mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 06:41:48 +00:00
Remove fragment kind knowledge from builtin macros
This commit is contained in:
parent
247faf271b
commit
31588aea04
3 changed files with 35 additions and 23 deletions
|
@ -113,6 +113,7 @@ pub fn expand_eager_macro(
|
|||
|
||||
let ast_map = db.ast_id_map(macro_call.file_id);
|
||||
let call_id = InFile::new(macro_call.file_id, ast_map.ast_id(¯o_call.value));
|
||||
let fragment = crate::to_fragment_kind(¯o_call.value);
|
||||
|
||||
// Note:
|
||||
// When `lazy_expand` is called, its *parent* file must be already exists.
|
||||
|
@ -152,7 +153,7 @@ pub fn expand_eager_macro(
|
|||
arg_or_expansion: Arc::new(expanded.subtree),
|
||||
included_file: expanded.included_file,
|
||||
}),
|
||||
kind: MacroCallKind::FnLike { ast_id: call_id, fragment: expanded.fragment },
|
||||
kind: MacroCallKind::FnLike { ast_id: call_id, fragment },
|
||||
};
|
||||
|
||||
Ok(db.intern_macro(loc))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue