aboutsummaryrefslogtreecommitdiff
path: root/crates/hir/src/semantics.rs
diff options
context:
space:
mode:
authorJonas Schievink <[email protected]>2021-05-06 22:23:50 +0100
committerJonas Schievink <[email protected]>2021-05-06 22:23:50 +0100
commit20ae41c1a12963e938cb3bd4c7c84007412d6fa6 (patch)
tree361153338ec7c32866a5477b3e7681d05a4b0b7c /crates/hir/src/semantics.rs
parentc4f9cb9b53314b584f6451908ce40bbd65453116 (diff)
Reuse database in LowerCtx
Diffstat (limited to 'crates/hir/src/semantics.rs')
-rw-r--r--crates/hir/src/semantics.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/hir/src/semantics.rs b/crates/hir/src/semantics.rs
index d53d81c07..62500602a 100644
--- a/crates/hir/src/semantics.rs
+++ b/crates/hir/src/semantics.rs
@@ -855,7 +855,7 @@ impl<'a> SemanticsScope<'a> {
855 /// necessary a heuristic, as it doesn't take hygiene into account. 855 /// necessary a heuristic, as it doesn't take hygiene into account.
856 pub fn speculative_resolve(&self, path: &ast::Path) -> Option<PathResolution> { 856 pub fn speculative_resolve(&self, path: &ast::Path) -> Option<PathResolution> {
857 let ctx = body::LowerCtx::new(self.db.upcast(), self.file_id); 857 let ctx = body::LowerCtx::new(self.db.upcast(), self.file_id);
858 let path = Path::from_src(self.db.upcast(), path.clone(), &ctx)?; 858 let path = Path::from_src(path.clone(), &ctx)?;
859 resolve_hir_path(self.db, &self.resolver, &path) 859 resolve_hir_path(self.db, &self.resolver, &path)
860 } 860 }
861} 861}