aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/nameres
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir/src/nameres')
-rw-r--r--crates/ra_hir/src/nameres/tests.rs29
1 files changed, 29 insertions, 0 deletions
diff --git a/crates/ra_hir/src/nameres/tests.rs b/crates/ra_hir/src/nameres/tests.rs
index 82222d1ad..4e3659ad0 100644
--- a/crates/ra_hir/src/nameres/tests.rs
+++ b/crates/ra_hir/src/nameres/tests.rs
@@ -79,6 +79,35 @@ fn item_map_smoke_test() {
79} 79}
80 80
81#[test] 81#[test]
82fn use_trees() {
83 let (item_map, module_id) = item_map(
84 "
85 //- /lib.rs
86 mod foo;
87
88 use crate::foo::bar::{Baz, Quux};
89 <|>
90
91 //- /foo/mod.rs
92 pub mod bar;
93
94 //- /foo/bar.rs
95 pub struct Baz;
96 pub enum Quux {};
97 ",
98 );
99 check_module_item_map(
100 &item_map,
101 module_id,
102 "
103 Baz: t v
104 Quux: t
105 foo: t
106 ",
107 );
108}
109
110#[test]
82fn re_exports() { 111fn re_exports() {
83 let (item_map, module_id) = item_map( 112 let (item_map, module_id) = item_map(
84 " 113 "