aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_def/src/nameres/tests/mod_resolution.rs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-06-24 16:07:37 +0100
committerGitHub <[email protected]>2020-06-24 16:07:37 +0100
commite9bdb05e9676e85bdd8fa5008e3ada3812b36fd9 (patch)
treea21d348fbfa2d06f1fba77622c5417383938e6fe /crates/ra_hir_def/src/nameres/tests/mod_resolution.rs
parent1a3b507a007d0373a83bde203d780b860ea55ce1 (diff)
parent2928600374a8356c2c2bffee080c47cb0f463fb9 (diff)
Merge #4990
4990: Introduce an ItemTree layer to avoid reparsing files r=matklad a=jonas-schievink This reduces the latency of "go to definition" in a simple benchmark on rust-analyzer by around 30%. cc https://github.com/rust-analyzer/rust-analyzer/issues/1650 Closes https://github.com/rust-analyzer/rust-analyzer/issues/3485 Co-authored-by: Aleksey Kladov <[email protected]> Co-authored-by: Jonas Schievink <[email protected]> Co-authored-by: Jonas Schievink <[email protected]>
Diffstat (limited to 'crates/ra_hir_def/src/nameres/tests/mod_resolution.rs')
-rw-r--r--crates/ra_hir_def/src/nameres/tests/mod_resolution.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/crates/ra_hir_def/src/nameres/tests/mod_resolution.rs b/crates/ra_hir_def/src/nameres/tests/mod_resolution.rs
index b43b294ca..e9a5e4cba 100644
--- a/crates/ra_hir_def/src/nameres/tests/mod_resolution.rs
+++ b/crates/ra_hir_def/src/nameres/tests/mod_resolution.rs
@@ -20,8 +20,11 @@ fn name_res_works_for_broken_modules() {
20 ", 20 ",
21 ); 21 );
22 assert_snapshot!(map, @r###" 22 assert_snapshot!(map, @r###"
23 ⋮crate 23crate
24 ⋮Baz: _ 24Baz: _
25foo: t
26
27crate::foo
25 "###); 28 "###);
26} 29}
27 30
@@ -719,10 +722,7 @@ fn unresolved_module_diagnostics() {
719 ), 722 ),
720 ), 723 ),
721 ), 724 ),
722 value: FileAstId { 725 value: FileAstId::<ra_syntax::ast::generated::nodes::Module>(1),
723 raw: Idx::<SyntaxNodePtr>(1),
724 _ty: PhantomData,
725 },
726 }, 726 },
727 candidate: "bar.rs", 727 candidate: "bar.rs",
728 }, 728 },