1
Fork 0

Auto merge of #31596 - mitaa:rdoc_assoc_item, r=alexcrichton

This commit is contained in:
bors 2016-02-13 19:28:09 +00:00
commit c438802aa7
5 changed files with 11 additions and 13 deletions

View file

@ -2550,25 +2550,25 @@ fn render_impl(w: &mut fmt::Formatter, cx: &Context, i: &Impl, link: AssocItemLi
}
}
clean::TypedefItem(ref tydef, _) => {
let id = derive_id(format!("assoc_type.{}", name));
let id = derive_id(format!("associatedtype.{}", name));
try!(write!(w, "<h4 id='{}' class='{}'><code>", id, shortty(item)));
try!(write!(w, "type {} = {}", name, tydef.type_));
try!(write!(w, "</code></h4>\n"));
}
clean::AssociatedConstItem(ref ty, ref default) => {
let id = derive_id(format!("assoc_const.{}", name));
let id = derive_id(format!("associatedconstant.{}", name));
try!(write!(w, "<h4 id='{}' class='{}'><code>", id, shortty(item)));
try!(assoc_const(w, item, ty, default.as_ref()));
try!(write!(w, "</code></h4>\n"));
}
clean::ConstantItem(ref c) => {
let id = derive_id(format!("assoc_const.{}", name));
let id = derive_id(format!("associatedconstant.{}", name));
try!(write!(w, "<h4 id='{}' class='{}'><code>", id, shortty(item)));
try!(assoc_const(w, item, &c.type_, Some(&c.expr)));
try!(write!(w, "</code></h4>\n"));
}
clean::AssociatedTypeItem(ref bounds, ref default) => {
let id = derive_id(format!("assoc_type.{}", name));
let id = derive_id(format!("associatedtype.{}", name));
try!(write!(w, "<h4 id='{}' class='{}'><code>", id, shortty(item)));
try!(assoc_type(w, item, bounds, default));
try!(write!(w, "</code></h4>\n"));