]> git.lizzy.rs Git - rust.git/commitdiff
Add missing description in alias items
authorGuillaume Gomez <guillaume1.gomez@gmail.com>
Thu, 26 Apr 2018 20:27:12 +0000 (22:27 +0200)
committerGuillaume Gomez <guillaume1.gomez@gmail.com>
Sat, 12 May 2018 17:16:37 +0000 (19:16 +0200)
src/librustdoc/html/render.rs

index 21de2db1dfe74fd7bf1930e06b38b3e20589b31b..7fff981d09094c8855ec34ed69a80566f8660f47 100644 (file)
@@ -879,8 +879,8 @@ fn collect(path: &Path, krate: &str, key: &str) -> io::Result<Vec<String>> {
     }
 
     fn show_item(item: &IndexItem, krate: &str) -> String {
-        format!("{{'crate':'{}','ty':{},'name':'{}','path':'{}'{}}}",
-                krate, item.ty as usize, item.name, item.path,
+        format!("{{'crate':'{}','ty':{},'name':'{}','desc':'{}','path':'{}'{}}}",
+                krate, item.ty as usize, item.name, item.desc, item.path,
                 if let Some(p) = item.parent_idx {
                     format!(",'parent':{}", p)
                 } else {
@@ -1442,7 +1442,7 @@ fn add_aliases(&mut self, item: &clean::Item) {
                                 ty: item.type_(),
                                 name: item_name.to_string(),
                                 path: path.clone(),
-                                desc: String::new(),
+                                desc: plain_summary_line(item.doc_value()),
                                 parent: None,
                                 parent_idx: None,
                                 search_type: get_index_search_type(&item),