aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_assists/src/handlers
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-08-12 17:49:43 +0100
committerAleksey Kladov <[email protected]>2020-08-12 17:59:13 +0100
commit0635458a6bf883b5abcae024afb17a11688fef92 (patch)
treee754396302c88aa602bb77be30ce1835c205f730 /crates/ra_assists/src/handlers
parentd583f2c46d22cf8d643ebf98be9cb7059a304431 (diff)
**Merge Imports** assist handles self
Diffstat (limited to 'crates/ra_assists/src/handlers')
-rw-r--r--crates/ra_assists/src/handlers/merge_imports.rs27
1 files changed, 27 insertions, 0 deletions
diff --git a/crates/ra_assists/src/handlers/merge_imports.rs b/crates/ra_assists/src/handlers/merge_imports.rs
index 9c5c6eda7..47d465404 100644
--- a/crates/ra_assists/src/handlers/merge_imports.rs
+++ b/crates/ra_assists/src/handlers/merge_imports.rs
@@ -165,6 +165,33 @@ use std::fmt::{Display, Debug};
165 } 165 }
166 166
167 #[test] 167 #[test]
168 fn merge_self1() {
169 check_assist(
170 merge_imports,
171 r"
172use std::fmt<|>;
173use std::fmt::Display;
174",
175 r"
176use std::fmt::{self, Display};
177",
178 );
179 }
180
181 #[test]
182 fn merge_self2() {
183 check_assist(
184 merge_imports,
185 r"
186use std::{fmt, <|>fmt::Display};
187",
188 r"
189use std::{fmt::{Display, self}};
190",
191 );
192 }
193
194 #[test]
168 fn test_merge_nested() { 195 fn test_merge_nested() {
169 check_assist( 196 check_assist(
170 merge_imports, 197 merge_imports,