From 2619950b3b405324ab1c1745876165c834b3b4b9 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Fri, 13 Dec 2019 12:12:36 +0100 Subject: Use different types for path with and without generics --- crates/ra_hir_def/src/nameres/raw.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'crates/ra_hir_def/src/nameres/raw.rs') diff --git a/crates/ra_hir_def/src/nameres/raw.rs b/crates/ra_hir_def/src/nameres/raw.rs index a2821e1c3..ecb4d7c03 100644 --- a/crates/ra_hir_def/src/nameres/raw.rs +++ b/crates/ra_hir_def/src/nameres/raw.rs @@ -22,7 +22,7 @@ use ra_syntax::{ use test_utils::tested_by; use crate::{ - attr::Attrs, db::DefDatabase, path::Path, trace::Trace, FileAstId, HirFileId, InFile, + attr::Attrs, db::DefDatabase, path::ModPath, trace::Trace, FileAstId, HirFileId, InFile, LocalImportId, }; @@ -154,7 +154,7 @@ pub(super) enum ModuleData { #[derive(Debug, Clone, PartialEq, Eq)] pub struct ImportData { - pub(super) path: Path, + pub(super) path: ModPath, pub(super) alias: Option, pub(super) is_glob: bool, pub(super) is_prelude: bool, @@ -206,7 +206,7 @@ impl_arena_id!(Macro); #[derive(Debug, PartialEq, Eq)] pub(super) struct MacroData { pub(super) ast_id: FileAstId, - pub(super) path: Path, + pub(super) path: ModPath, pub(super) name: Option, pub(super) export: bool, pub(super) builtin: bool, @@ -327,7 +327,7 @@ impl RawItemsCollector { let attrs = self.parse_attrs(&use_item); let mut buf = Vec::new(); - Path::expand_use_item( + ModPath::expand_use_item( InFile { value: use_item, file_id: self.file_id }, &self.hygiene, |path, use_tree, is_glob, alias| { @@ -353,7 +353,7 @@ impl RawItemsCollector { extern_crate: ast::ExternCrateItem, ) { if let Some(name_ref) = extern_crate.name_ref() { - let path = Path::from_name_ref(&name_ref); + let path = ModPath::from_name_ref(&name_ref); let alias = extern_crate.alias().and_then(|a| a.name()).map(|it| it.as_name()); let attrs = self.parse_attrs(&extern_crate); // FIXME: cfg_attr @@ -377,7 +377,7 @@ impl RawItemsCollector { fn add_macro(&mut self, current_module: Option, m: ast::MacroCall) { let attrs = self.parse_attrs(&m); - let path = match m.path().and_then(|path| Path::from_src(path, &self.hygiene)) { + let path = match m.path().and_then(|path| ModPath::from_src(path, &self.hygiene)) { Some(it) => it, _ => return, }; -- cgit v1.2.3