diff options
-rw-r--r-- | crates/ra_hir/src/nameres/tests.rs | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/crates/ra_hir/src/nameres/tests.rs b/crates/ra_hir/src/nameres/tests.rs index 0e0683db7..81c8a4f12 100644 --- a/crates/ra_hir/src/nameres/tests.rs +++ b/crates/ra_hir/src/nameres/tests.rs | |||
@@ -91,6 +91,30 @@ fn item_map_smoke_test() { | |||
91 | } | 91 | } |
92 | 92 | ||
93 | #[test] | 93 | #[test] |
94 | fn use_as() { | ||
95 | let (item_map, module_id) = item_map( | ||
96 | " | ||
97 | //- /lib.rs | ||
98 | mod foo; | ||
99 | |||
100 | use crate::foo::Baz as Foo; | ||
101 | <|> | ||
102 | |||
103 | //- /foo/mod.rs | ||
104 | pub struct Baz; | ||
105 | ", | ||
106 | ); | ||
107 | check_module_item_map( | ||
108 | &item_map, | ||
109 | module_id, | ||
110 | " | ||
111 | Foo: t v | ||
112 | foo: t | ||
113 | ", | ||
114 | ); | ||
115 | } | ||
116 | |||
117 | #[test] | ||
94 | fn use_trees() { | 118 | fn use_trees() { |
95 | let (item_map, module_id) = item_map( | 119 | let (item_map, module_id) = item_map( |
96 | " | 120 | " |