diff options
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); |