aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_assists/src/handlers
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_assists/src/handlers')
-rw-r--r--crates/ra_assists/src/handlers/merge_imports.rs12
-rw-r--r--crates/ra_assists/src/handlers/split_import.rs10
2 files changed, 21 insertions, 1 deletions
diff --git a/crates/ra_assists/src/handlers/merge_imports.rs b/crates/ra_assists/src/handlers/merge_imports.rs
index 972d16241..ac0b3035c 100644
--- a/crates/ra_assists/src/handlers/merge_imports.rs
+++ b/crates/ra_assists/src/handlers/merge_imports.rs
@@ -127,7 +127,7 @@ fn first_path(path: &ast::Path) -> ast::Path {
127 127
128#[cfg(test)] 128#[cfg(test)]
129mod tests { 129mod tests {
130 use crate::tests::check_assist; 130 use crate::tests::{check_assist, check_assist_not_applicable};
131 131
132 use super::*; 132 use super::*;
133 133
@@ -276,4 +276,14 @@ bar::baz};
276", 276",
277 ) 277 )
278 } 278 }
279
280 #[test]
281 fn test_empty_use() {
282 check_assist_not_applicable(
283 merge_imports,
284 r"
285use std::<|>
286fn main() {}",
287 );
288 }
279} 289}
diff --git a/crates/ra_assists/src/handlers/split_import.rs b/crates/ra_assists/src/handlers/split_import.rs
index c7a874480..38aa199a0 100644
--- a/crates/ra_assists/src/handlers/split_import.rs
+++ b/crates/ra_assists/src/handlers/split_import.rs
@@ -66,4 +66,14 @@ mod tests {
66 fn issue4044() { 66 fn issue4044() {
67 check_assist_not_applicable(split_import, "use crate::<|>:::self;") 67 check_assist_not_applicable(split_import, "use crate::<|>:::self;")
68 } 68 }
69
70 #[test]
71 fn test_empty_use() {
72 check_assist_not_applicable(
73 split_import,
74 r"
75use std::<|>
76fn main() {}",
77 );
78 }
69} 79}