aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_assists
diff options
context:
space:
mode:
authorKirill Bulatov <[email protected]>2020-02-01 20:13:02 +0000
committerKirill Bulatov <[email protected]>2020-02-01 20:13:02 +0000
commitd3188769e41a051df7f02395b43f11e5cedede0b (patch)
tree4e223570d7ed75e24156d5452ac79ef1f1c53bf4 /crates/ra_assists
parent96bd4f5704f447800067ce69d50ab8b4b2315fdb (diff)
Auto import functions
Diffstat (limited to 'crates/ra_assists')
-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 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}