Skip to content

Commit 05f4a75

Browse files
committed
Auto merge of #38414 - estebank:doc-dissambiguate, r=steveklabnik
Rustdoc: disambiguate Implementors when the type name is not unique Presentation [goes from](https://doc.rust-lang.org/stable/std/iter/trait.ExactSizeIterator.html#implementors): <img width="492" alt="" src="https://cloud.githubusercontent.com/assets/1606434/21276752/b2b50474-c387-11e6-96e1-9766851da269.png"> to: <img width="787" alt="" src="https://cloud.githubusercontent.com/assets/1606434/21276763/bb37f6b0-c387-11e6-8596-9163cb254674.png"> on cases where there're multiple implementors with the same name. Fixes #37762.
2 parents d40d01b + 346a442 commit 05f4a75

File tree

3 files changed

+203
-168
lines changed

3 files changed

+203
-168
lines changed

src/librustdoc/clean/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -2219,8 +2219,8 @@ impl Path {
22192219
}
22202220
}
22212221

2222-
pub fn last_name(&self) -> String {
2223-
self.segments.last().unwrap().name.clone()
2222+
pub fn last_name(&self) -> &str {
2223+
self.segments.last().unwrap().name.as_str()
22242224
}
22252225
}
22262226

0 commit comments

Comments
 (0)