mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +00:00
Shuffle hir-expand things around
This commit is contained in:
parent
e320004dad
commit
880baa9e56
8 changed files with 295 additions and 258 deletions
|
@ -40,7 +40,7 @@ pub enum PathKind {
|
|||
Crate,
|
||||
/// Absolute path (::foo)
|
||||
Abs,
|
||||
// FIXME: Remove this
|
||||
// FIXME: Can we remove this somehow?
|
||||
/// `$crate` from macro expansion
|
||||
DollarCrate(CrateId),
|
||||
}
|
||||
|
@ -59,7 +59,8 @@ impl ModPath {
|
|||
}
|
||||
|
||||
pub fn from_segments(kind: PathKind, segments: impl IntoIterator<Item = Name>) -> ModPath {
|
||||
let segments = segments.into_iter().collect();
|
||||
let mut segments: SmallVec<_> = segments.into_iter().collect();
|
||||
segments.shrink_to_fit();
|
||||
ModPath { kind, segments }
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue