diff options
Diffstat (limited to 'crates/ra_hir/src/nameres.rs')
-rw-r--r-- | crates/ra_hir/src/nameres.rs | 32 |
1 files changed, 14 insertions, 18 deletions
diff --git a/crates/ra_hir/src/nameres.rs b/crates/ra_hir/src/nameres.rs index f4ca454e4..53ef8d58a 100644 --- a/crates/ra_hir/src/nameres.rs +++ b/crates/ra_hir/src/nameres.rs | |||
@@ -55,28 +55,24 @@ mod tests; | |||
55 | 55 | ||
56 | use std::sync::Arc; | 56 | use std::sync::Arc; |
57 | 57 | ||
58 | use once_cell::sync::Lazy; | ||
59 | use ra_arena::{impl_arena_id, Arena, RawId}; | ||
60 | use ra_db::{Edition, FileId}; | ||
61 | use ra_prof::profile; | ||
62 | use ra_syntax::ast; | ||
58 | use rustc_hash::{FxHashMap, FxHashSet}; | 63 | use rustc_hash::{FxHashMap, FxHashSet}; |
59 | use ra_arena::{Arena, RawId, impl_arena_id}; | ||
60 | use ra_db::{FileId, Edition}; | ||
61 | use test_utils::tested_by; | 64 | use test_utils::tested_by; |
62 | use ra_syntax::ast; | ||
63 | use ra_prof::profile; | ||
64 | use once_cell::sync::Lazy; | ||
65 | 65 | ||
66 | use crate::{ | 66 | use crate::{ |
67 | ModuleDef, Name, Crate, Module, MacroDef, AsName, BuiltinType, AstDatabase, | 67 | diagnostics::DiagnosticSink, either::Either, ids::MacroDefId, |
68 | DefDatabase, Path, PathKind, HirFileId, Trait, | 68 | nameres::diagnostics::DefDiagnostic, AsName, AstDatabase, AstId, BuiltinType, Crate, |
69 | ids::MacroDefId, | 69 | DefDatabase, HirFileId, MacroDef, Module, ModuleDef, Name, Path, PathKind, Trait, |
70 | diagnostics::DiagnosticSink, | ||
71 | nameres::diagnostics::DefDiagnostic, | ||
72 | either::Either, | ||
73 | AstId, | ||
74 | }; | 70 | }; |
75 | 71 | ||
76 | pub(crate) use self::raw::{RawItems, ImportSourceMap}; | 72 | pub(crate) use self::raw::{ImportSourceMap, RawItems}; |
77 | 73 | ||
78 | pub use self::{ | 74 | pub use self::{ |
79 | per_ns::{PerNs, Namespace}, | 75 | per_ns::{Namespace, PerNs}, |
80 | raw::ImportId, | 76 | raw::ImportId, |
81 | }; | 77 | }; |
82 | 78 | ||
@@ -512,14 +508,14 @@ impl CrateDefMap { | |||
512 | } | 508 | } |
513 | 509 | ||
514 | mod diagnostics { | 510 | mod diagnostics { |
511 | use ra_syntax::{ast, AstPtr}; | ||
515 | use relative_path::RelativePathBuf; | 512 | use relative_path::RelativePathBuf; |
516 | use ra_syntax::{AstPtr, ast}; | ||
517 | 513 | ||
518 | use crate::{ | 514 | use crate::{ |
519 | AstId, DefDatabase, AstDatabase, | 515 | diagnostics::{DiagnosticSink, UnresolvedModule}, |
520 | nameres::CrateModuleId, | 516 | nameres::CrateModuleId, |
521 | diagnostics::{DiagnosticSink, UnresolvedModule} | 517 | AstDatabase, AstId, DefDatabase, |
522 | }; | 518 | }; |
523 | 519 | ||
524 | #[derive(Debug, PartialEq, Eq)] | 520 | #[derive(Debug, PartialEq, Eq)] |
525 | pub(super) enum DefDiagnostic { | 521 | pub(super) enum DefDiagnostic { |