mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 06:41:48 +00:00
refactor $crate handling
Introduce proper hygiene module, which should grow quite a bit eventually.
This commit is contained in:
parent
e34e71c62d
commit
0bc7d28518
7 changed files with 118 additions and 89 deletions
|
@ -1,6 +1,7 @@
|
|||
//! FIXME: write short doc here
|
||||
|
||||
use hir_def::{
|
||||
hygiene::Hygiene,
|
||||
name::{self, AsName, Name},
|
||||
path::GenericArgs,
|
||||
type_ref::TypeRef,
|
||||
|
@ -597,7 +598,8 @@ where
|
|||
}
|
||||
|
||||
fn parse_path(&mut self, path: ast::Path) -> Option<Path> {
|
||||
Path::from_src(Source { ast: path, file_id: self.current_file_id }, self.db)
|
||||
let hygiene = Hygiene::new(self.db, self.current_file_id);
|
||||
Path::from_src(path, &hygiene)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue