aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_assists/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_assists/src')
-rw-r--r--crates/ra_assists/src/assists/auto_import.rs24
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 9e874aebb..2629f00e6 100644
--- a/crates/ra_assists/src/assists/auto_import.rs
+++ b/crates/ra_assists/src/assists/auto_import.rs
@@ -232,4 +232,28 @@ mod tests {
232 }", 232 }",
233 ); 233 );
234 } 234 }
235
236 #[test]
237 fn function_import() {
238 check_assist_with_imports_locator(
239 auto_import,
240 TestImportsLocator::new,
241 r"
242 test_function<|>
243
244 pub mod PubMod {
245 pub fn test_function() {};
246 }
247 ",
248 r"
249 use PubMod::test_function;
250
251 test_function<|>
252
253 pub mod PubMod {
254 pub fn test_function() {};
255 }
256 ",
257 );
258 }
235} 259}