diff options
author | Florian Diebold <[email protected]> | 2019-01-08 13:39:55 +0000 |
---|---|---|
committer | Florian Diebold <[email protected]> | 2019-01-08 14:00:29 +0000 |
commit | d4b44a092f1fd5267a02719667d8d5e22ba0d904 (patch) | |
tree | 78b6ad184afc4e759968fa3c00c5fcc7babaf3db /crates/ra_hir/src/nameres | |
parent | 562b448f9e49235fd47dabca1a0ce53da65dec6f (diff) |
Fix use tree desugaring
Diffstat (limited to 'crates/ra_hir/src/nameres')
-rw-r--r-- | crates/ra_hir/src/nameres/tests.rs | 29 |
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] |
82 | fn 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] | ||
82 | fn re_exports() { | 111 | fn re_exports() { |
83 | let (item_map, module_id) = item_map( | 112 | let (item_map, module_id) = item_map( |
84 | " | 113 | " |