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/nameres | |
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/nameres')
-rw-r--r-- | crates/ra_hir/src/nameres/collector.rs | 25 | ||||
-rw-r--r-- | crates/ra_hir/src/nameres/raw.rs | 15 | ||||
-rw-r--r-- | crates/ra_hir/src/nameres/tests.rs | 6 |
3 files changed, 23 insertions, 23 deletions
diff --git a/crates/ra_hir/src/nameres/collector.rs b/crates/ra_hir/src/nameres/collector.rs index ef4d1ed70..2b07ebf4a 100644 --- a/crates/ra_hir/src/nameres/collector.rs +++ b/crates/ra_hir/src/nameres/collector.rs | |||
@@ -1,22 +1,19 @@ | |||
1 | use arrayvec::ArrayVec; | 1 | use arrayvec::ArrayVec; |
2 | use rustc_hash::FxHashMap; | ||
3 | use relative_path::RelativePathBuf; | ||
4 | use test_utils::tested_by; | ||
5 | use ra_db::FileId; | 2 | use ra_db::FileId; |
6 | use ra_syntax::ast; | 3 | use ra_syntax::ast; |
4 | use relative_path::RelativePathBuf; | ||
5 | use rustc_hash::FxHashMap; | ||
6 | use test_utils::tested_by; | ||
7 | 7 | ||
8 | use crate::{ | 8 | use crate::{ |
9 | Function, Module, Struct, Union, Enum, Const, Static, Trait, TypeAlias, MacroDef, | 9 | either::Either, |
10 | DefDatabase, HirFileId, Name, Path, | 10 | ids::{AstItemDef, LocationCtx, MacroCallId, MacroCallLoc, MacroDefId, MacroFileKind}, |
11 | KnownName, AstId, | ||
12 | nameres::{ | 11 | nameres::{ |
13 | Resolution, PerNs, ModuleDef, ReachedFixedPoint, ResolveMode, | 12 | diagnostics::DefDiagnostic, raw, CrateDefMap, CrateModuleId, ItemOrMacro, ModuleData, |
14 | CrateDefMap, CrateModuleId, ModuleData, ItemOrMacro, | 13 | ModuleDef, PerNs, ReachedFixedPoint, Resolution, ResolveMode, |
15 | diagnostics::DefDiagnostic, | ||
16 | raw, | ||
17 | }, | 14 | }, |
18 | ids::{AstItemDef, LocationCtx, MacroCallLoc, MacroCallId, MacroDefId, MacroFileKind}, | 15 | AstId, Const, DefDatabase, Enum, Function, HirFileId, KnownName, MacroDef, Module, Name, Path, |
19 | either::Either, | 16 | Static, Struct, Trait, TypeAlias, Union, |
20 | }; | 17 | }; |
21 | 18 | ||
22 | pub(super) fn collect_defs(db: &impl DefDatabase, mut def_map: CrateDefMap) -> CrateDefMap { | 19 | pub(super) fn collect_defs(db: &impl DefDatabase, mut def_map: CrateDefMap) -> CrateDefMap { |
@@ -666,9 +663,9 @@ fn resolve_submodule( | |||
666 | mod tests { | 663 | mod tests { |
667 | use ra_db::SourceDatabase; | 664 | use ra_db::SourceDatabase; |
668 | 665 | ||
669 | use crate::{Crate, mock::MockDatabase, DefDatabase}; | ||
670 | use ra_arena::{Arena}; | ||
671 | use super::*; | 666 | use super::*; |
667 | use crate::{mock::MockDatabase, Crate, DefDatabase}; | ||
668 | use ra_arena::Arena; | ||
672 | use rustc_hash::FxHashSet; | 669 | use rustc_hash::FxHashSet; |
673 | 670 | ||
674 | fn do_collect_defs( | 671 | fn do_collect_defs( |
diff --git a/crates/ra_hir/src/nameres/raw.rs b/crates/ra_hir/src/nameres/raw.rs index a0afe282c..7ea59cb75 100644 --- a/crates/ra_hir/src/nameres/raw.rs +++ b/crates/ra_hir/src/nameres/raw.rs | |||
@@ -1,13 +1,16 @@ | |||
1 | use std::{sync::Arc, ops::Index}; | 1 | use std::{ops::Index, sync::Arc}; |
2 | 2 | ||
3 | use test_utils::tested_by; | 3 | use ra_arena::{impl_arena_id, map::ArenaMap, Arena, RawId}; |
4 | use ra_arena::{Arena, impl_arena_id, RawId, map::ArenaMap}; | ||
5 | use ra_syntax::{ | 4 | use ra_syntax::{ |
6 | AstNode, SourceFile, AstPtr, TreeArc, | 5 | ast::{self, AttrsOwner, NameOwner}, |
7 | ast::{self, NameOwner, AttrsOwner}, | 6 | AstNode, AstPtr, SourceFile, TreeArc, |
8 | }; | 7 | }; |
8 | use test_utils::tested_by; | ||
9 | 9 | ||
10 | use crate::{DefDatabase, Name, AsName, Path, HirFileId, ModuleSource, AstIdMap, FileAstId, Either, AstDatabase}; | 10 | use crate::{ |
11 | AsName, AstDatabase, AstIdMap, DefDatabase, Either, FileAstId, HirFileId, ModuleSource, Name, | ||
12 | Path, | ||
13 | }; | ||
11 | 14 | ||
12 | /// `RawItems` is a set of top-level items in a file (except for impls). | 15 | /// `RawItems` is a set of top-level items in a file (except for impls). |
13 | /// | 16 | /// |
diff --git a/crates/ra_hir/src/nameres/tests.rs b/crates/ra_hir/src/nameres/tests.rs index 07b533e29..bd2d855cf 100644 --- a/crates/ra_hir/src/nameres/tests.rs +++ b/crates/ra_hir/src/nameres/tests.rs | |||
@@ -5,14 +5,14 @@ mod primitives; | |||
5 | 5 | ||
6 | use std::sync::Arc; | 6 | use std::sync::Arc; |
7 | 7 | ||
8 | use insta::assert_snapshot_matches; | ||
8 | use ra_db::SourceDatabase; | 9 | use ra_db::SourceDatabase; |
9 | use test_utils::covers; | 10 | use test_utils::covers; |
10 | use insta::assert_snapshot_matches; | ||
11 | 11 | ||
12 | use crate::{ | 12 | use crate::{ |
13 | Crate, Either, | 13 | mock::{CrateGraphFixture, MockDatabase}, |
14 | mock::{MockDatabase, CrateGraphFixture}, | ||
15 | nameres::Resolution, | 14 | nameres::Resolution, |
15 | Crate, Either, | ||
16 | }; | 16 | }; |
17 | 17 | ||
18 | use super::*; | 18 | use super::*; |