From 31588aea04aa1240fdc7b5279535f63b9f1681f8 Mon Sep 17 00:00:00 2001 From: Jonas Schievink Date: Sat, 29 May 2021 17:17:08 +0200 Subject: Remove fragment kind knowledge from builtin macros --- crates/hir_expand/src/eager.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'crates/hir_expand/src/eager.rs') diff --git a/crates/hir_expand/src/eager.rs b/crates/hir_expand/src/eager.rs index 1464320ba..14af628a1 100644 --- a/crates/hir_expand/src/eager.rs +++ b/crates/hir_expand/src/eager.rs @@ -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)) -- cgit v1.2.3