mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
Don't expose hir::Path out of hir
Conjecture: it's impossible to use hir::Path *correctly* from an IDE. I am not entirely sure about this, and we might need to add it back at some point, but I have to arguments that convince me that we probably won't: * `hir::Path` has to know about hygiene, which an IDE can't set up properly. * `hir::Path` lacks identity, but you actually have to know identity to resolve it correctly
This commit is contained in:
parent
2052d33b9b
commit
0ca1ba29e8
9 changed files with 51 additions and 92 deletions
|
@ -48,7 +48,7 @@ pub use hir_def::{
|
|||
builtin_type::BuiltinType,
|
||||
docs::Documentation,
|
||||
nameres::ModuleSource,
|
||||
path::{ModPath, Path, PathKind},
|
||||
path::ModPath,
|
||||
type_ref::{Mutability, TypeRef},
|
||||
};
|
||||
pub use hir_expand::{
|
||||
|
@ -60,4 +60,7 @@ pub use hir_ty::display::HirDisplay;
|
|||
// These are negative re-exports: pub using these names is forbidden, they
|
||||
// should remain private to hir internals.
|
||||
#[allow(unused)]
|
||||
use hir_expand::hygiene::Hygiene;
|
||||
use {
|
||||
hir_def::path::{Path, PathKind},
|
||||
hir_expand::hygiene::Hygiene,
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue