diff options
author | Florian Diebold <[email protected]> | 2019-12-26 15:31:38 +0000 |
---|---|---|
committer | Florian Diebold <[email protected]> | 2019-12-26 15:31:38 +0000 |
commit | 04cf98f8a6a67c899dd290d4b66c37794b24a568 (patch) | |
tree | 0fa656975139c8d8530d01381e118d07e79cb27b /crates/ra_hir_def/src/nameres/tests | |
parent | 78111620a33c57b58b07ebf044a7d53dc56176ef (diff) |
Fix cross-crate glob privacy handling
Diffstat (limited to 'crates/ra_hir_def/src/nameres/tests')
-rw-r--r-- | crates/ra_hir_def/src/nameres/tests/globs.rs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/crates/ra_hir_def/src/nameres/tests/globs.rs b/crates/ra_hir_def/src/nameres/tests/globs.rs index 82d947b78..71fa0abe8 100644 --- a/crates/ra_hir_def/src/nameres/tests/globs.rs +++ b/crates/ra_hir_def/src/nameres/tests/globs.rs | |||
@@ -170,6 +170,26 @@ fn glob_across_crates() { | |||
170 | } | 170 | } |
171 | 171 | ||
172 | #[test] | 172 | #[test] |
173 | fn glob_privacy_across_crates() { | ||
174 | covers!(glob_across_crates); | ||
175 | let map = def_map( | ||
176 | " | ||
177 | //- /main.rs crate:main deps:test_crate | ||
178 | use test_crate::*; | ||
179 | |||
180 | //- /lib.rs crate:test_crate | ||
181 | pub struct Baz; | ||
182 | struct Foo; | ||
183 | ", | ||
184 | ); | ||
185 | assert_snapshot!(map, @r###" | ||
186 | ⋮crate | ||
187 | ⋮Baz: t v | ||
188 | "### | ||
189 | ); | ||
190 | } | ||
191 | |||
192 | #[test] | ||
173 | fn glob_enum() { | 193 | fn glob_enum() { |
174 | covers!(glob_enum); | 194 | covers!(glob_enum); |
175 | let map = def_map( | 195 | let map = def_map( |