diff options
Diffstat (limited to 'crates/ide_db/src/helpers/insert_use.rs')
-rw-r--r-- | crates/ide_db/src/helpers/insert_use.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/crates/ide_db/src/helpers/insert_use.rs b/crates/ide_db/src/helpers/insert_use.rs index 20c195f82..be3a22725 100644 --- a/crates/ide_db/src/helpers/insert_use.rs +++ b/crates/ide_db/src/helpers/insert_use.rs | |||
@@ -1,7 +1,6 @@ | |||
1 | //! Handle syntactic aspects of inserting a new `use`. | 1 | //! Handle syntactic aspects of inserting a new `use`. |
2 | use std::{cmp::Ordering, iter::successors}; | 2 | use std::{cmp::Ordering, iter::successors}; |
3 | 3 | ||
4 | use crate::RootDatabase; | ||
5 | use hir::Semantics; | 4 | use hir::Semantics; |
6 | use itertools::{EitherOrBoth, Itertools}; | 5 | use itertools::{EitherOrBoth, Itertools}; |
7 | use syntax::{ | 6 | use syntax::{ |
@@ -14,6 +13,8 @@ use syntax::{ | |||
14 | AstToken, InsertPosition, NodeOrToken, SyntaxElement, SyntaxNode, SyntaxToken, | 13 | AstToken, InsertPosition, NodeOrToken, SyntaxElement, SyntaxNode, SyntaxToken, |
15 | }; | 14 | }; |
16 | 15 | ||
16 | use crate::RootDatabase; | ||
17 | |||
17 | pub use hir::PrefixKind; | 18 | pub use hir::PrefixKind; |
18 | 19 | ||
19 | #[derive(Clone, Copy, Debug, PartialEq, Eq)] | 20 | #[derive(Clone, Copy, Debug, PartialEq, Eq)] |
@@ -509,7 +510,7 @@ impl ImportGroup { | |||
509 | PathSegmentKind::SelfKw => ImportGroup::ThisModule, | 510 | PathSegmentKind::SelfKw => ImportGroup::ThisModule, |
510 | PathSegmentKind::SuperKw => ImportGroup::SuperModule, | 511 | PathSegmentKind::SuperKw => ImportGroup::SuperModule, |
511 | PathSegmentKind::CrateKw => ImportGroup::ThisCrate, | 512 | PathSegmentKind::CrateKw => ImportGroup::ThisCrate, |
512 | PathSegmentKind::Name(name) => match name.text() { | 513 | PathSegmentKind::Name(name) => match name.text().as_str() { |
513 | "std" => ImportGroup::Std, | 514 | "std" => ImportGroup::Std, |
514 | "core" => ImportGroup::Std, | 515 | "core" => ImportGroup::Std, |
515 | _ => ImportGroup::ExternCrate, | 516 | _ => ImportGroup::ExternCrate, |