aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_def/src/find_path.rs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-05-06 22:53:05 +0100
committerGitHub <[email protected]>2021-05-06 22:53:05 +0100
commit6fccb152b4646877e38dc29dce1b0cd826eb6908 (patch)
tree361153338ec7c32866a5477b3e7681d05a4b0b7c /crates/hir_def/src/find_path.rs
parentb37b709459a4ff881a91965ebf0c39e3a449c304 (diff)
parent20ae41c1a12963e938cb3bd4c7c84007412d6fa6 (diff)
Merge #8746
8746: Don't store call-site text offsets in hygiene info r=matklad a=jonas-schievink This threads a lot more database references around in order to avoid storing a bare `TextOffset` in the hygiene info. This `TextOffset` made hygiene info and `ItemTree`s more volatile than they should be, leading to excessive recomputation of `ItemTree`s. The incremental test added in https://github.com/rust-analyzer/rust-analyzer/pull/8721 is now passing with these changes. closes https://github.com/rust-analyzer/rust-analyzer/pull/8721 Co-authored-by: Jonas Schievink <[email protected]> Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/hir_def/src/find_path.rs')
-rw-r--r--crates/hir_def/src/find_path.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/hir_def/src/find_path.rs b/crates/hir_def/src/find_path.rs
index c06a37294..858e88038 100644
--- a/crates/hir_def/src/find_path.rs
+++ b/crates/hir_def/src/find_path.rs
@@ -386,7 +386,7 @@ mod tests {
386 let parsed_path_file = syntax::SourceFile::parse(&format!("use {};", path)); 386 let parsed_path_file = syntax::SourceFile::parse(&format!("use {};", path));
387 let ast_path = 387 let ast_path =
388 parsed_path_file.syntax_node().descendants().find_map(syntax::ast::Path::cast).unwrap(); 388 parsed_path_file.syntax_node().descendants().find_map(syntax::ast::Path::cast).unwrap();
389 let mod_path = ModPath::from_src(ast_path, &Hygiene::new_unhygienic()).unwrap(); 389 let mod_path = ModPath::from_src(&db, ast_path, &Hygiene::new_unhygienic()).unwrap();
390 390
391 let def_map = module.def_map(&db); 391 let def_map = module.def_map(&db);
392 let resolved = def_map 392 let resolved = def_map