diff options
Diffstat (limited to 'crates/hir/src')
-rw-r--r-- | crates/hir/src/code_model.rs | 10 | ||||
-rw-r--r-- | crates/hir/src/lib.rs | 8 |
2 files changed, 9 insertions, 9 deletions
diff --git a/crates/hir/src/code_model.rs b/crates/hir/src/code_model.rs index 5721a66c4..c75d46bff 100644 --- a/crates/hir/src/code_model.rs +++ b/crates/hir/src/code_model.rs | |||
@@ -2,8 +2,9 @@ | |||
2 | use std::{iter, sync::Arc}; | 2 | use std::{iter, sync::Arc}; |
3 | 3 | ||
4 | use arrayvec::ArrayVec; | 4 | use arrayvec::ArrayVec; |
5 | use base_db::{CrateId, Edition, FileId}; | 5 | use base_db::{CrateId, CrateName, Edition, FileId}; |
6 | use either::Either; | 6 | use either::Either; |
7 | use hir_def::find_path::PrefixKind; | ||
7 | use hir_def::{ | 8 | use hir_def::{ |
8 | adt::ReprKind, | 9 | adt::ReprKind, |
9 | adt::StructKind, | 10 | adt::StructKind, |
@@ -98,8 +99,8 @@ impl Crate { | |||
98 | db.crate_graph()[self.id].edition | 99 | db.crate_graph()[self.id].edition |
99 | } | 100 | } |
100 | 101 | ||
101 | pub fn display_name(self, db: &dyn HirDatabase) -> Option<String> { | 102 | pub fn declaration_name(self, db: &dyn HirDatabase) -> Option<CrateName> { |
102 | db.crate_graph()[self.id].display_name.clone() | 103 | db.crate_graph()[self.id].declaration_name.clone() |
103 | } | 104 | } |
104 | 105 | ||
105 | pub fn query_external_importables( | 106 | pub fn query_external_importables( |
@@ -390,8 +391,9 @@ impl Module { | |||
390 | self, | 391 | self, |
391 | db: &dyn DefDatabase, | 392 | db: &dyn DefDatabase, |
392 | item: impl Into<ItemInNs>, | 393 | item: impl Into<ItemInNs>, |
394 | prefix_kind: PrefixKind, | ||
393 | ) -> Option<ModPath> { | 395 | ) -> Option<ModPath> { |
394 | hir_def::find_path::find_path_prefixed(db, item.into(), self.into()) | 396 | hir_def::find_path::find_path_prefixed(db, item.into(), self.into(), prefix_kind) |
395 | } | 397 | } |
396 | } | 398 | } |
397 | 399 | ||
diff --git a/crates/hir/src/lib.rs b/crates/hir/src/lib.rs index b9d9c7e25..171118d98 100644 --- a/crates/hir/src/lib.rs +++ b/crates/hir/src/lib.rs | |||
@@ -48,9 +48,10 @@ pub use hir_def::{ | |||
48 | body::scope::ExprScopes, | 48 | body::scope::ExprScopes, |
49 | builtin_type::BuiltinType, | 49 | builtin_type::BuiltinType, |
50 | docs::Documentation, | 50 | docs::Documentation, |
51 | find_path::PrefixKind, | ||
51 | item_scope::ItemInNs, | 52 | item_scope::ItemInNs, |
52 | nameres::ModuleSource, | 53 | nameres::ModuleSource, |
53 | path::ModPath, | 54 | path::{ModPath, PathKind}, |
54 | type_ref::{Mutability, TypeRef}, | 55 | type_ref::{Mutability, TypeRef}, |
55 | }; | 56 | }; |
56 | pub use hir_expand::{ | 57 | pub use hir_expand::{ |
@@ -62,7 +63,4 @@ pub use hir_ty::display::HirDisplay; | |||
62 | // These are negative re-exports: pub using these names is forbidden, they | 63 | // These are negative re-exports: pub using these names is forbidden, they |
63 | // should remain private to hir internals. | 64 | // should remain private to hir internals. |
64 | #[allow(unused)] | 65 | #[allow(unused)] |
65 | use { | 66 | use {hir_def::path::Path, hir_expand::hygiene::Hygiene}; |
66 | hir_def::path::{Path, PathKind}, | ||
67 | hir_expand::hygiene::Hygiene, | ||
68 | }; | ||