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_ide_api/src/references.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_ide_api/src/references.rs')
-rw-r--r-- | crates/ra_ide_api/src/references.rs | 30 |
1 files changed, 9 insertions, 21 deletions
diff --git a/crates/ra_ide_api/src/references.rs b/crates/ra_ide_api/src/references.rs index 12cdc6a6d..766c0ad74 100644 --- a/crates/ra_ide_api/src/references.rs +++ b/crates/ra_ide_api/src/references.rs | |||
@@ -1,22 +1,11 @@ | |||
1 | use hir::{source_binder, Either, ModuleSource}; | ||
2 | use ra_db::SourceDatabase; | ||
3 | use ra_syntax::{algo::find_node_at_offset, ast, AstNode, SourceFile, SyntaxNode}; | ||
1 | use relative_path::{RelativePath, RelativePathBuf}; | 4 | use relative_path::{RelativePath, RelativePathBuf}; |
2 | use hir::{ModuleSource, source_binder, Either}; | ||
3 | use ra_db::{SourceDatabase}; | ||
4 | use ra_syntax::{ | ||
5 | AstNode, SyntaxNode, SourceFile, | ||
6 | ast, | ||
7 | algo::find_node_at_offset, | ||
8 | }; | ||
9 | 5 | ||
10 | use crate::{ | 6 | use crate::{ |
11 | db::RootDatabase, | 7 | db::RootDatabase, FileId, FilePosition, FileRange, FileSystemEdit, NavigationTarget, |
12 | FilePosition, | 8 | SourceChange, SourceFileEdit, TextRange, |
13 | FileRange, | ||
14 | FileId, | ||
15 | NavigationTarget, | ||
16 | FileSystemEdit, | ||
17 | SourceChange, | ||
18 | SourceFileEdit, | ||
19 | TextRange, | ||
20 | }; | 9 | }; |
21 | 10 | ||
22 | #[derive(Debug, Clone)] | 11 | #[derive(Debug, Clone)] |
@@ -210,13 +199,12 @@ fn rename_reference( | |||
210 | 199 | ||
211 | #[cfg(test)] | 200 | #[cfg(test)] |
212 | mod tests { | 201 | mod tests { |
202 | use crate::{ | ||
203 | mock_analysis::analysis_and_position, mock_analysis::single_file_with_position, FileId, | ||
204 | ReferenceSearchResult, | ||
205 | }; | ||
213 | use insta::assert_debug_snapshot_matches; | 206 | use insta::assert_debug_snapshot_matches; |
214 | use test_utils::assert_eq_text; | 207 | use test_utils::assert_eq_text; |
215 | use crate::{ | ||
216 | mock_analysis::single_file_with_position, | ||
217 | mock_analysis::analysis_and_position, | ||
218 | FileId, ReferenceSearchResult | ||
219 | }; | ||
220 | 208 | ||
221 | #[test] | 209 | #[test] |
222 | fn test_find_all_refs_for_local() { | 210 | fn test_find_all_refs_for_local() { |