diff options
Diffstat (limited to 'crates/ra_ide/src/join_lines.rs')
-rw-r--r-- | crates/ra_ide/src/join_lines.rs | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/crates/ra_ide/src/join_lines.rs b/crates/ra_ide/src/join_lines.rs index caf63933a..35cec87f6 100644 --- a/crates/ra_ide/src/join_lines.rs +++ b/crates/ra_ide/src/join_lines.rs | |||
@@ -1,6 +1,6 @@ | |||
1 | use itertools::Itertools; | 1 | use itertools::Itertools; |
2 | use ra_fmt::{compute_ws, extract_trivial_expression}; | 2 | use ra_fmt::{compute_ws, extract_trivial_expression}; |
3 | use ra_syntax::{ | 3 | use syntax::{ |
4 | algo::{find_covering_element, non_trivia_sibling}, | 4 | algo::{find_covering_element, non_trivia_sibling}, |
5 | ast::{self, AstNode, AstToken}, | 5 | ast::{self, AstNode, AstToken}, |
6 | Direction, NodeOrToken, SourceFile, | 6 | Direction, NodeOrToken, SourceFile, |
@@ -170,7 +170,7 @@ fn is_trailing_comma(left: SyntaxKind, right: SyntaxKind) -> bool { | |||
170 | 170 | ||
171 | #[cfg(test)] | 171 | #[cfg(test)] |
172 | mod tests { | 172 | mod tests { |
173 | use ra_syntax::SourceFile; | 173 | use syntax::SourceFile; |
174 | use test_utils::{add_cursor, assert_eq_text, extract_offset, extract_range}; | 174 | use test_utils::{add_cursor, assert_eq_text, extract_offset, extract_range}; |
175 | 175 | ||
176 | use super::*; | 176 | use super::*; |
@@ -437,11 +437,11 @@ fn foo() { | |||
437 | // No space after the '{' | 437 | // No space after the '{' |
438 | check_join_lines( | 438 | check_join_lines( |
439 | r" | 439 | r" |
440 | <|>use ra_syntax::{ | 440 | <|>use syntax::{ |
441 | TextSize, TextRange, | 441 | TextSize, TextRange, |
442 | };", | 442 | };", |
443 | r" | 443 | r" |
444 | <|>use ra_syntax::{TextSize, TextRange, | 444 | <|>use syntax::{TextSize, TextRange, |
445 | };", | 445 | };", |
446 | ); | 446 | ); |
447 | } | 447 | } |
@@ -451,11 +451,11 @@ fn foo() { | |||
451 | // No space after the '}' | 451 | // No space after the '}' |
452 | check_join_lines( | 452 | check_join_lines( |
453 | r" | 453 | r" |
454 | use ra_syntax::{ | 454 | use syntax::{ |
455 | <|> TextSize, TextRange | 455 | <|> TextSize, TextRange |
456 | };", | 456 | };", |
457 | r" | 457 | r" |
458 | use ra_syntax::{ | 458 | use syntax::{ |
459 | <|> TextSize, TextRange};", | 459 | <|> TextSize, TextRange};", |
460 | ); | 460 | ); |
461 | } | 461 | } |
@@ -465,11 +465,11 @@ use ra_syntax::{ | |||
465 | // No space after the '}' | 465 | // No space after the '}' |
466 | check_join_lines( | 466 | check_join_lines( |
467 | r" | 467 | r" |
468 | use ra_syntax::{ | 468 | use syntax::{ |
469 | <|> TextSize, TextRange, | 469 | <|> TextSize, TextRange, |
470 | };", | 470 | };", |
471 | r" | 471 | r" |
472 | use ra_syntax::{ | 472 | use syntax::{ |
473 | <|> TextSize, TextRange};", | 473 | <|> TextSize, TextRange};", |
474 | ); | 474 | ); |
475 | } | 475 | } |
@@ -478,14 +478,14 @@ use ra_syntax::{ | |||
478 | fn test_join_lines_use_tree() { | 478 | fn test_join_lines_use_tree() { |
479 | check_join_lines( | 479 | check_join_lines( |
480 | r" | 480 | r" |
481 | use ra_syntax::{ | 481 | use syntax::{ |
482 | algo::<|>{ | 482 | algo::<|>{ |
483 | find_token_at_offset, | 483 | find_token_at_offset, |
484 | }, | 484 | }, |
485 | ast, | 485 | ast, |
486 | };", | 486 | };", |
487 | r" | 487 | r" |
488 | use ra_syntax::{ | 488 | use syntax::{ |
489 | algo::<|>find_token_at_offset, | 489 | algo::<|>find_token_at_offset, |
490 | ast, | 490 | ast, |
491 | };", | 491 | };", |