Skip to content

Commit

Permalink
Find type of orphan methods for rustdoc search.
Browse files Browse the repository at this point in the history
  • Loading branch information
mihneadb committed Jun 14, 2015
1 parent 043f93f commit 434684b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/librustdoc/html/render.rs
Original file line number Diff line number Diff line change
Expand Up @@ -456,13 +456,15 @@ fn build_index(krate: &clean::Crate, cache: &mut Cache) -> io::Result<String> {
let did = ast_util::local_def(pid);
match paths.get(&did) {
Some(&(ref fqp, _)) => {
// Needed to determine `self` type.
let parent_basename = Some(fqp[fqp.len() - 1].clone());
search_index.push(IndexItem {
ty: shortty(item),
name: item.name.clone().unwrap(),
path: fqp[..fqp.len() - 1].connect("::"),
desc: shorter(item.doc_value()),
parent: Some(did),
search_type: None,
search_type: get_index_search_type(&item, parent_basename),
});
},
None => {}
Expand Down

0 comments on commit 434684b

Please sign in to comment.