mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 22:31:43 +00:00
source_binder.rs: fix order of imports
This commit is contained in:
parent
6a94f203fc
commit
4034ea9e4e
1 changed files with 10 additions and 9 deletions
|
@ -7,6 +7,16 @@
|
|||
/// purely for "IDE needs".
|
||||
use std::sync::Arc;
|
||||
|
||||
use ra_db::{FileId, FilePosition};
|
||||
use ra_syntax::{
|
||||
algo::find_node_at_offset,
|
||||
ast::{self, AstNode, NameOwner},
|
||||
AstPtr,
|
||||
SyntaxKind::*,
|
||||
SyntaxNode, SyntaxNodePtr, TextRange, TextUnit,
|
||||
};
|
||||
use rustc_hash::{FxHashMap, FxHashSet};
|
||||
|
||||
use crate::{
|
||||
expr::{
|
||||
self,
|
||||
|
@ -21,15 +31,6 @@ use crate::{
|
|||
MacroDef, Module, ModuleDef, Name, Path, PerNs, Resolution, Resolver, Static, Struct, Trait,
|
||||
Ty,
|
||||
};
|
||||
use ra_db::{FileId, FilePosition};
|
||||
use ra_syntax::{
|
||||
algo::find_node_at_offset,
|
||||
ast::{self, AstNode, NameOwner},
|
||||
AstPtr,
|
||||
SyntaxKind::*,
|
||||
SyntaxNode, SyntaxNodePtr, TextRange, TextUnit,
|
||||
};
|
||||
use rustc_hash::{FxHashMap, FxHashSet};
|
||||
|
||||
/// Locates the module by `FileId`. Picks topmost module in the file.
|
||||
pub fn module_from_file_id(db: &impl HirDatabase, file_id: FileId) -> Option<Module> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue