aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_def/src/lib.rs
diff options
context:
space:
mode:
authorJonas Schievink <[email protected]>2021-05-06 18:59:54 +0100
committerJonas Schievink <[email protected]>2021-05-06 18:59:54 +0100
commit976a3226fe0f145dfefd473e9fecd63d58aca50e (patch)
tree59dd6c2e4cc81c3f9285d47e5a44e370110818c7 /crates/hir_def/src/lib.rs
parentb37b709459a4ff881a91965ebf0c39e3a449c304 (diff)
Don't store call-site text offsets in hygiene info
Diffstat (limited to 'crates/hir_def/src/lib.rs')
-rw-r--r--crates/hir_def/src/lib.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/hir_def/src/lib.rs b/crates/hir_def/src/lib.rs
index 25694f037..da46f16f7 100644
--- a/crates/hir_def/src/lib.rs
+++ b/crates/hir_def/src/lib.rs
@@ -654,7 +654,7 @@ impl AsMacroCall for InFile<&ast::MacroCall> {
654 ) -> Result<Result<MacroCallId, ErrorEmitted>, UnresolvedMacro> { 654 ) -> Result<Result<MacroCallId, ErrorEmitted>, UnresolvedMacro> {
655 let ast_id = AstId::new(self.file_id, db.ast_id_map(self.file_id).ast_id(self.value)); 655 let ast_id = AstId::new(self.file_id, db.ast_id_map(self.file_id).ast_id(self.value));
656 let h = Hygiene::new(db.upcast(), self.file_id); 656 let h = Hygiene::new(db.upcast(), self.file_id);
657 let path = self.value.path().and_then(|path| path::ModPath::from_src(path, &h)); 657 let path = self.value.path().and_then(|path| path::ModPath::from_src(db, path, &h));
658 658
659 let path = match error_sink 659 let path = match error_sink
660 .option(path, || mbe::ExpandError::Other("malformed macro invocation".into())) 660 .option(path, || mbe::ExpandError::Other("malformed macro invocation".into()))
@@ -712,7 +712,7 @@ fn macro_call_as_call_id(
712 krate, 712 krate,
713 macro_call, 713 macro_call,
714 def, 714 def,
715 &|path: ast::Path| resolver(path::ModPath::from_src(path, &hygiene)?), 715 &|path: ast::Path| resolver(path::ModPath::from_src(db, path, &hygiene)?),
716 error_sink, 716 error_sink,
717 ) 717 )
718 .map(MacroCallId::from) 718 .map(MacroCallId::from)