We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6d2154e commit 880af42Copy full SHA for 880af42
crates/hir_ty/src/display.rs
@@ -1141,7 +1141,7 @@ impl HirDisplay for Path {
1141
write!(f, ">")?;
1142
}
1143
(_, PathKind::Plain) => {}
1144
- (_, PathKind::Abs) => write!(f, "::")?,
+ (_, PathKind::Abs) => write!(f, "")?,
1145
(_, PathKind::Crate) => write!(f, "crate")?,
1146
(_, PathKind::Super(0)) => write!(f, "self")?,
1147
(_, PathKind::Super(n)) => {
@@ -1154,7 +1154,7 @@ impl HirDisplay for Path {
1154
1155
1156
for (seg_idx, segment) in self.segments().iter().enumerate() {
1157
- if seg_idx != 0 || matches!(self.kind(), PathKind::Crate) {
+ if !matches!(self.kind(), PathKind::Plain) || seg_idx > 0 {
1158
write!(f, "::")?;
1159
1160
write!(f, "{}", segment.name)?;
0 commit comments