Skip to content

Commit ac408e4

Browse files
P1n3appl3jyn514
authored andcommitted
Add json backend
1 parent dc06a36 commit ac408e4

File tree

4 files changed

+1258
-14
lines changed

4 files changed

+1258
-14
lines changed

src/librustdoc/clean/types.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1576,6 +1576,11 @@ impl Path {
15761576
pub fn last_name(&self) -> &str {
15771577
self.segments.last().expect("segments were empty").name.as_str()
15781578
}
1579+
1580+
pub fn whole_name(&self) -> String {
1581+
String::from(if self.global { "::" } else { "" })
1582+
+ &self.segments.iter().map(|s| s.name.clone()).collect::<Vec<_>>().join("::")
1583+
}
15791584
}
15801585

15811586
#[derive(Clone, PartialEq, Eq, Debug, Hash)]

0 commit comments

Comments
 (0)