diff options
Diffstat (limited to 'crates/ra_assists')
-rw-r--r-- | crates/ra_assists/src/assists/auto_import.rs | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/crates/ra_assists/src/assists/auto_import.rs b/crates/ra_assists/src/assists/auto_import.rs index 932a52bff..8c483e2da 100644 --- a/crates/ra_assists/src/assists/auto_import.rs +++ b/crates/ra_assists/src/assists/auto_import.rs | |||
@@ -211,4 +211,28 @@ mod tests { | |||
211 | }", | 211 | }", |
212 | ); | 212 | ); |
213 | } | 213 | } |
214 | |||
215 | #[test] | ||
216 | fn function_import() { | ||
217 | check_assist_with_imports_locator( | ||
218 | auto_import, | ||
219 | TestImportsLocator::new, | ||
220 | r" | ||
221 | test_function<|> | ||
222 | |||
223 | pub mod PubMod { | ||
224 | pub fn test_function() {}; | ||
225 | } | ||
226 | ", | ||
227 | r" | ||
228 | use PubMod::test_function; | ||
229 | |||
230 | test_function<|> | ||
231 | |||
232 | pub mod PubMod { | ||
233 | pub fn test_function() {}; | ||
234 | } | ||
235 | ", | ||
236 | ); | ||
237 | } | ||
214 | } | 238 | } |