diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-07-04 21:09:32 +0100 |
---|---|---|
committer | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-07-04 21:09:32 +0100 |
commit | cacdb0eab8131bfb945eb7ed0150c92ec56eefe2 (patch) | |
tree | f762de90ce813591bc640ae0bce36493a3dcafa9 /crates/ra_hir/src/expr/scope.rs | |
parent | 4e8664d9d37021e85d72b6228fa45e7edf4a1a74 (diff) | |
parent | 1834bae5b86c54ed9dece26e82436919d59e6cb7 (diff) |
Merge #1486
1486: allow rustfmt to reorder imports r=matklad a=matklad
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_hir/src/expr/scope.rs')
-rw-r--r-- | crates/ra_hir/src/expr/scope.rs | 13 |
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 @@ | |||
1 | use std::sync::Arc; | 1 | use std::sync::Arc; |
2 | 2 | ||
3 | use ra_arena::{impl_arena_id, Arena, RawId}; | ||
3 | use rustc_hash::FxHashMap; | 4 | use rustc_hash::FxHashMap; |
4 | use ra_arena::{Arena, RawId, impl_arena_id}; | ||
5 | 5 | ||
6 | use crate::{ | 6 | use 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)] |
174 | mod tests { | 173 | mod 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); |