aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_def/src/nameres/tests/incremental.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/incremental.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/incremental.rs')
-rw-r--r--crates/ra_hir_def/src/nameres/tests/incremental.rs38
1 files changed, 0 insertions, 38 deletions
diff --git a/crates/ra_hir_def/src/nameres/tests/incremental.rs b/crates/ra_hir_def/src/nameres/tests/incremental.rs
index 87165ac33..0c288a108 100644
--- a/crates/ra_hir_def/src/nameres/tests/incremental.rs
+++ b/crates/ra_hir_def/src/nameres/tests/incremental.rs
@@ -58,44 +58,6 @@ fn typing_inside_a_function_should_not_invalidate_def_map() {
58} 58}
59 59
60#[test] 60#[test]
61fn adding_inner_items_should_not_invalidate_def_map() {
62 check_def_map_is_not_recomputed(
63 r"
64 //- /lib.rs
65 struct S { a: i32}
66 enum E { A }
67 trait T {
68 fn a() {}
69 }
70 mod foo;<|>
71 impl S {
72 fn a() {}
73 }
74 use crate::foo::bar::Baz;
75 //- /foo/mod.rs
76 pub mod bar;
77
78 //- /foo/bar.rs
79 pub struct Baz;
80 ",
81 r"
82 struct S { a: i32, b: () }
83 enum E { A, B }
84 trait T {
85 fn a() {}
86 fn b() {}
87 }
88 mod foo;<|>
89 impl S {
90 fn a() {}
91 fn b() {}
92 }
93 use crate::foo::bar::Baz;
94 ",
95 );
96}
97
98#[test]
99fn typing_inside_a_macro_should_not_invalidate_def_map() { 61fn typing_inside_a_macro_should_not_invalidate_def_map() {
100 let (mut db, pos) = TestDB::with_position( 62 let (mut db, pos) = TestDB::with_position(
101 r" 63 r"