Skip to content

Commit 9328cd1

Browse files
committed
Add json backend
1 parent 43bec40 commit 9328cd1

File tree

4 files changed

+1258
-14
lines changed

4 files changed

+1258
-14
lines changed

src/librustdoc/clean/types.rs

+5
Original file line numberDiff line numberDiff line change
@@ -1410,6 +1410,11 @@ impl Path {
14101410
pub fn last_name(&self) -> &str {
14111411
self.segments.last().expect("segments were empty").name.as_str()
14121412
}
1413+
1414+
pub fn whole_name(&self) -> String {
1415+
String::from(if self.global { "::" } else { "" })
1416+
+ &self.segments.iter().map(|s| s.name.clone()).collect::<Vec<_>>().join("::")
1417+
}
14131418
}
14141419

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

0 commit comments

Comments
 (0)