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/expr/scope.rs | 13 ++++++------- crates/ra_hir/src/expr/validation.rs | 11 +++++------ 2 files changed, 11 insertions(+), 13 deletions(-) (limited to 'crates/ra_hir/src/expr') diff --git a/crates/ra_hir/src/expr/scope.rs b/crates/ra_hir/src/expr/scope.rs index 83d226fc1..f27cc6e8d 100644 --- a/crates/ra_hir/src/expr/scope.rs +++ b/crates/ra_hir/src/expr/scope.rs @@ -1,12 +1,11 @@ use std::sync::Arc; +use ra_arena::{impl_arena_id, Arena, RawId}; use rustc_hash::FxHashMap; -use ra_arena::{Arena, RawId, impl_arena_id}; use crate::{ - Name, DefWithBody, - expr::{PatId, ExprId, Pat, Expr, Body, Statement}, - HirDatabase, + expr::{Body, Expr, ExprId, Pat, PatId, Statement}, + DefWithBody, HirDatabase, Name, }; #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] @@ -173,10 +172,10 @@ fn compute_expr_scopes(expr: ExprId, body: &Body, scopes: &mut ExprScopes, scope #[cfg(test)] mod tests { use ra_db::SourceDatabase; - use ra_syntax::{algo::find_node_at_offset, AstNode, SyntaxNodePtr, ast}; - use test_utils::{extract_offset, assert_eq_text}; + use ra_syntax::{algo::find_node_at_offset, ast, AstNode, SyntaxNodePtr}; + use test_utils::{assert_eq_text, extract_offset}; - use crate::{source_binder::SourceAnalyzer, mock::MockDatabase}; + use crate::{mock::MockDatabase, source_binder::SourceAnalyzer}; fn do_check(code: &str, expected: &[&str]) { let (off, code) = extract_offset(code); diff --git a/crates/ra_hir/src/expr/validation.rs b/crates/ra_hir/src/expr/validation.rs index 534fd482b..8206dae2e 100644 --- a/crates/ra_hir/src/expr/validation.rs +++ b/crates/ra_hir/src/expr/validation.rs @@ -1,17 +1,16 @@ -use std::sync::Arc; use rustc_hash::FxHashSet; +use std::sync::Arc; use ra_syntax::ast::{AstNode, StructLit}; +use super::{Expr, ExprId, StructLitField}; use crate::{ - expr::AstPtr, - HirDatabase, Function, Name, HasSource, - diagnostics::{DiagnosticSink, MissingFields}, adt::AdtDef, - Path, + diagnostics::{DiagnosticSink, MissingFields}, + expr::AstPtr, ty::InferenceResult, + Function, HasSource, HirDatabase, Name, Path, }; -use super::{Expr, StructLitField, ExprId}; pub(crate) struct ExprValidator<'a, 'b: 'a> { func: Function, -- cgit v1.2.3