diff --git a/src/librustdoc/clean/mod.rs b/src/librustdoc/clean/mod.rs index 5b8b2ecf95d..a48af1c162b 100644 --- a/src/librustdoc/clean/mod.rs +++ b/src/librustdoc/clean/mod.rs @@ -2206,7 +2206,7 @@ impl Path { } pub fn last_name(&self) -> &str { - self.segments.last().unwrap().name + self.segments.last().unwrap().name.as_str() } }