From 1834bae5b86c54ed9dece26e82436919d59e6cb7 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 4 Jul 2019 23:05:17 +0300 Subject: allow rustfmt to reorder imports This wasn't a right decision in the first place, the feature flag was broken in the last rustfmt release, and syntax highlighting of imports is more important anyway --- crates/ra_hir/src/source_binder.rs | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'crates/ra_hir/src/source_binder.rs') diff --git a/crates/ra_hir/src/source_binder.rs b/crates/ra_hir/src/source_binder.rs index 08e86844d..429575fee 100644 --- a/crates/ra_hir/src/source_binder.rs +++ b/crates/ra_hir/src/source_binder.rs @@ -7,21 +7,25 @@ /// purely for "IDE needs". use std::sync::Arc; -use rustc_hash::{FxHashSet, FxHashMap}; use ra_db::{FileId, FilePosition}; use ra_syntax::{ - SyntaxNode, AstPtr, TextUnit, SyntaxNodePtr, TextRange, - ast::{self, AstNode, NameOwner}, algo::find_node_at_offset, + ast::{self, AstNode, NameOwner}, + AstPtr, SyntaxKind::*, + SyntaxNode, SyntaxNodePtr, TextRange, TextUnit, }; +use rustc_hash::{FxHashMap, FxHashSet}; use crate::{ - HirDatabase, Function, Struct, Enum, Const, Static, Either, DefWithBody, PerNs, Name, - AsName, Module, HirFileId, Crate, Trait, Resolver, Ty, Path, MacroDef, - expr::{BodySourceMap, scope::{ScopeId, ExprScopes}}, + expr, + expr::{ + scope::{ExprScopes, ScopeId}, + BodySourceMap, + }, ids::LocationCtx, - expr, AstId, + AsName, AstId, Const, Crate, DefWithBody, Either, Enum, Function, HirDatabase, HirFileId, + MacroDef, Module, Name, Path, PerNs, Resolver, Static, Struct, Trait, Ty, }; /// Locates the module by `FileId`. Picks topmost module in the file. -- cgit v1.2.3