Skip to content

Commit 434684b

Browse files
committed
Find type of orphan methods for rustdoc search.
1 parent 043f93f commit 434684b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/librustdoc/html/render.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -456,13 +456,15 @@ fn build_index(krate: &clean::Crate, cache: &mut Cache) -> io::Result<String> {
456456
let did = ast_util::local_def(pid);
457457
match paths.get(&did) {
458458
Some(&(ref fqp, _)) => {
459+
// Needed to determine `self` type.
460+
let parent_basename = Some(fqp[fqp.len() - 1].clone());
459461
search_index.push(IndexItem {
460462
ty: shortty(item),
461463
name: item.name.clone().unwrap(),
462464
path: fqp[..fqp.len() - 1].connect("::"),
463465
desc: shorter(item.doc_value()),
464466
parent: Some(did),
465-
search_type: None,
467+
search_type: get_index_search_type(&item, parent_basename),
466468
});
467469
},
468470
None => {}

0 commit comments

Comments
 (0)