aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide/src/extend_selection.rs
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-02-06 11:52:32 +0000
committerAleksey Kladov <[email protected]>2020-02-06 13:03:45 +0000
commit88267c86c0c49de395973574d2516ab904091cfb (patch)
tree3c137f0c6a34c0ae787c7d8d59ccf2398fab1bfa /crates/ra_ide/src/extend_selection.rs
parent939f05f3e33e9f00d5205d60af3a862ae4d58bd6 (diff)
cleanup imports
Diffstat (limited to 'crates/ra_ide/src/extend_selection.rs')
-rw-r--r--crates/ra_ide/src/extend_selection.rs12
1 files changed, 7 insertions, 5 deletions
diff --git a/crates/ra_ide/src/extend_selection.rs b/crates/ra_ide/src/extend_selection.rs
index 930e0c4c2..726963a33 100644
--- a/crates/ra_ide/src/extend_selection.rs
+++ b/crates/ra_ide/src/extend_selection.rs
@@ -1,6 +1,10 @@
1//! FIXME: write short doc here 1//! FIXME: write short doc here
2 2
3use std::iter::successors;
4
5use hir::db::AstDatabase;
3use ra_db::SourceDatabase; 6use ra_db::SourceDatabase;
7use ra_ide_db::RootDatabase;
4use ra_syntax::{ 8use ra_syntax::{
5 algo::find_covering_element, 9 algo::find_covering_element,
6 ast::{self, AstNode, AstToken}, 10 ast::{self, AstNode, AstToken},
@@ -9,9 +13,7 @@ use ra_syntax::{
9 SyntaxNode, SyntaxToken, TextRange, TextUnit, TokenAtOffset, T, 13 SyntaxNode, SyntaxToken, TextRange, TextUnit, TokenAtOffset, T,
10}; 14};
11 15
12use crate::{db::RootDatabase, expand::descend_into_macros, FileId, FileRange}; 16use crate::{expand::descend_into_macros, FileId, FileRange};
13use hir::db::AstDatabase;
14use std::iter::successors;
15 17
16pub(crate) fn extend_selection(db: &RootDatabase, frange: FileRange) -> TextRange { 18pub(crate) fn extend_selection(db: &RootDatabase, frange: FileRange) -> TextRange {
17 let src = db.parse(frange.file_id).tree(); 19 let src = db.parse(frange.file_id).tree();
@@ -512,8 +514,8 @@ fn bar(){}
512 fn test_extend_trait_bounds_list_in_where_clause() { 514 fn test_extend_trait_bounds_list_in_where_clause() {
513 do_check( 515 do_check(
514 r#" 516 r#"
515fn foo<R>() 517fn foo<R>()
516 where 518 where
517 R: req::Request + 'static, 519 R: req::Request + 'static,
518 R::Params: DeserializeOwned<|> + panic::UnwindSafe + 'static, 520 R::Params: DeserializeOwned<|> + panic::UnwindSafe + 'static,
519 R::Result: Serialize + 'static, 521 R::Result: Serialize + 'static,