mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 22:54:58 +00:00
fix: path display error when start with crate
This commit is contained in:
parent
86ebc36fa3
commit
82ae228d98
2 changed files with 20 additions and 1 deletions
|
@ -1154,7 +1154,7 @@ impl HirDisplay for Path {
|
|||
}
|
||||
|
||||
for (seg_idx, segment) in self.segments().iter().enumerate() {
|
||||
if seg_idx != 0 {
|
||||
if seg_idx != 0 || matches!(self.kind(), PathKind::Crate) {
|
||||
write!(f, "::")?;
|
||||
}
|
||||
write!(f, "{}", segment.name)?;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue