refactor $crate handling

Introduce proper hygiene module, which should grow quite a bit
eventually.
This commit is contained in:
Aleksey Kladov 2019-10-30 18:41:50 +03:00
parent e34e71c62d
commit 0bc7d28518
7 changed files with 118 additions and 89 deletions

View file

@ -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)
}
}