Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir_def/src/lib.rs')
| -rw-r--r-- | crates/hir_def/src/lib.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/crates/hir_def/src/lib.rs b/crates/hir_def/src/lib.rs index ea6a2b4a6f..4904ebfd63 100644 --- a/crates/hir_def/src/lib.rs +++ b/crates/hir_def/src/lib.rs @@ -61,7 +61,7 @@ use hir_expand::{ ast_id_map::FileAstId, eager::{expand_eager_macro, ErrorEmitted, ErrorSink}, hygiene::Hygiene, - AstId, FragmentKind, HirFileId, InFile, MacroCallId, MacroCallKind, MacroDefId, MacroDefKind, + AstId, ExpandTo, HirFileId, InFile, MacroCallId, MacroCallKind, MacroDefId, MacroDefKind, }; use la_arena::Idx; use nameres::DefMap; @@ -667,7 +667,7 @@ impl AsMacroCall for InFile<&ast::MacroCall> { resolver: impl Fn(path::ModPath) -> Option<MacroDefId>, mut error_sink: &mut dyn FnMut(mbe::ExpandError), ) -> Result<Result<MacroCallId, ErrorEmitted>, UnresolvedMacro> { - let fragment = hir_expand::to_fragment_kind(self.value); + let expands_to = hir_expand::ExpandTo::from_call_site(self.value); let ast_id = AstId::new(self.file_id, db.ast_id_map(self.file_id).ast_id(self.value)); let h = Hygiene::new(db.upcast(), self.file_id); let path = self.value.path().and_then(|path| path::ModPath::from_src(db, path, &h)); @@ -683,7 +683,7 @@ impl AsMacroCall for InFile<&ast::MacroCall> { macro_call_as_call_id( &AstIdWithPath::new(ast_id.file_id, ast_id.value, path), - fragment, + expands_to, db, krate, resolver, @@ -712,7 +712,7 @@ pub struct UnresolvedMacro { fn macro_call_as_call_id( call: &AstIdWithPath<ast::MacroCall>, - fragment: FragmentKind, + expand_to: ExpandTo, db: &dyn db::DefDatabase, krate: CrateId, resolver: impl Fn(path::ModPath) -> Option<MacroDefId>, @@ -738,7 +738,7 @@ fn macro_call_as_call_id( Ok(def.as_lazy_macro( db.upcast(), krate, - MacroCallKind::FnLike { ast_id: call.ast_id, fragment }, + MacroCallKind::FnLike { ast_id: call.ast_id, expand_to }, )) }; Ok(res) |