aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/expr/scope.rs
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-07-04 21:05:17 +0100
committerAleksey Kladov <[email protected]>2019-07-04 21:09:09 +0100
commit1834bae5b86c54ed9dece26e82436919d59e6cb7 (patch)
tree92c8b984e874b67fa1831613464bbe356c1af3dd /crates/ra_hir/src/expr/scope.rs
parent2b2cd829b0f95aef338227deb05ec7503dae9b6c (diff)
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
Diffstat (limited to 'crates/ra_hir/src/expr/scope.rs')
-rw-r--r--crates/ra_hir/src/expr/scope.rs13
1 files changed, 6 insertions, 7 deletions
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 @@
1use std::sync::Arc; 1use std::sync::Arc;
2 2
3use ra_arena::{impl_arena_id, Arena, RawId};
3use rustc_hash::FxHashMap; 4use rustc_hash::FxHashMap;
4use ra_arena::{Arena, RawId, impl_arena_id};
5 5
6use crate::{ 6use crate::{
7 Name, DefWithBody, 7 expr::{Body, Expr, ExprId, Pat, PatId, Statement},
8 expr::{PatId, ExprId, Pat, Expr, Body, Statement}, 8 DefWithBody, HirDatabase, Name,
9 HirDatabase,
10}; 9};
11 10
12#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] 11#[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
173#[cfg(test)] 172#[cfg(test)]
174mod tests { 173mod tests {
175 use ra_db::SourceDatabase; 174 use ra_db::SourceDatabase;
176 use ra_syntax::{algo::find_node_at_offset, AstNode, SyntaxNodePtr, ast}; 175 use ra_syntax::{algo::find_node_at_offset, ast, AstNode, SyntaxNodePtr};
177 use test_utils::{extract_offset, assert_eq_text}; 176 use test_utils::{assert_eq_text, extract_offset};
178 177
179 use crate::{source_binder::SourceAnalyzer, mock::MockDatabase}; 178 use crate::{mock::MockDatabase, source_binder::SourceAnalyzer};
180 179
181 fn do_check(code: &str, expected: &[&str]) { 180 fn do_check(code: &str, expected: &[&str]) {
182 let (off, code) = extract_offset(code); 181 let (off, code) = extract_offset(code);