aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_def/src/nameres/raw.rs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2019-12-14 18:16:48 +0000
committerGitHub <[email protected]>2019-12-14 18:16:48 +0000
commitd6223253b628b279f9ddae8f83f7173d01f6b32c (patch)
tree12f2ccc5c52c1c0b67932d3a35fe18668b8e5d62 /crates/ra_hir_def/src/nameres/raw.rs
parent202ad1e2d9376565cb273cf085be600ed10e5a93 (diff)
parent2619950b3b405324ab1c1745876165c834b3b4b9 (diff)
Merge #2561
2561: Split generic and non-generic paths r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_hir_def/src/nameres/raw.rs')
-rw-r--r--crates/ra_hir_def/src/nameres/raw.rs12
1 files changed, 6 insertions, 6 deletions
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::{
22use test_utils::tested_by; 22use test_utils::tested_by;
23 23
24use crate::{ 24use crate::{
25 attr::Attrs, db::DefDatabase, path::Path, trace::Trace, FileAstId, HirFileId, InFile, 25 attr::Attrs, db::DefDatabase, path::ModPath, trace::Trace, FileAstId, HirFileId, InFile,
26 LocalImportId, 26 LocalImportId,
27}; 27};
28 28
@@ -154,7 +154,7 @@ pub(super) enum ModuleData {
154 154
155#[derive(Debug, Clone, PartialEq, Eq)] 155#[derive(Debug, Clone, PartialEq, Eq)]
156pub struct ImportData { 156pub struct ImportData {
157 pub(super) path: Path, 157 pub(super) path: ModPath,
158 pub(super) alias: Option<Name>, 158 pub(super) alias: Option<Name>,
159 pub(super) is_glob: bool, 159 pub(super) is_glob: bool,
160 pub(super) is_prelude: bool, 160 pub(super) is_prelude: bool,
@@ -206,7 +206,7 @@ impl_arena_id!(Macro);
206#[derive(Debug, PartialEq, Eq)] 206#[derive(Debug, PartialEq, Eq)]
207pub(super) struct MacroData { 207pub(super) struct MacroData {
208 pub(super) ast_id: FileAstId<ast::MacroCall>, 208 pub(super) ast_id: FileAstId<ast::MacroCall>,
209 pub(super) path: Path, 209 pub(super) path: ModPath,
210 pub(super) name: Option<Name>, 210 pub(super) name: Option<Name>,
211 pub(super) export: bool, 211 pub(super) export: bool,
212 pub(super) builtin: bool, 212 pub(super) builtin: bool,
@@ -327,7 +327,7 @@ impl RawItemsCollector {
327 let attrs = self.parse_attrs(&use_item); 327 let attrs = self.parse_attrs(&use_item);
328 328
329 let mut buf = Vec::new(); 329 let mut buf = Vec::new();
330 Path::expand_use_item( 330 ModPath::expand_use_item(
331 InFile { value: use_item, file_id: self.file_id }, 331 InFile { value: use_item, file_id: self.file_id },
332 &self.hygiene, 332 &self.hygiene,
333 |path, use_tree, is_glob, alias| { 333 |path, use_tree, is_glob, alias| {
@@ -353,7 +353,7 @@ impl RawItemsCollector {
353 extern_crate: ast::ExternCrateItem, 353 extern_crate: ast::ExternCrateItem,
354 ) { 354 ) {
355 if let Some(name_ref) = extern_crate.name_ref() { 355 if let Some(name_ref) = extern_crate.name_ref() {
356 let path = Path::from_name_ref(&name_ref); 356 let path = ModPath::from_name_ref(&name_ref);
357 let alias = extern_crate.alias().and_then(|a| a.name()).map(|it| it.as_name()); 357 let alias = extern_crate.alias().and_then(|a| a.name()).map(|it| it.as_name());
358 let attrs = self.parse_attrs(&extern_crate); 358 let attrs = self.parse_attrs(&extern_crate);
359 // FIXME: cfg_attr 359 // FIXME: cfg_attr
@@ -377,7 +377,7 @@ impl RawItemsCollector {
377 377
378 fn add_macro(&mut self, current_module: Option<Module>, m: ast::MacroCall) { 378 fn add_macro(&mut self, current_module: Option<Module>, m: ast::MacroCall) {
379 let attrs = self.parse_attrs(&m); 379 let attrs = self.parse_attrs(&m);
380 let path = match m.path().and_then(|path| Path::from_src(path, &self.hygiene)) { 380 let path = match m.path().and_then(|path| ModPath::from_src(path, &self.hygiene)) {
381 Some(it) => it, 381 Some(it) => it,
382 _ => return, 382 _ => return,
383 }; 383 };