rollup merge of #20725: tomjakubowski/rustdoc-misc
Conflicts: src/librustdoc/html/format.rs
This commit is contained in:
commit
cb344be99d
2 changed files with 41 additions and 4 deletions
|
@ -206,8 +206,10 @@ impl fmt::String for clean::TyParamBound {
|
|||
impl fmt::String for clean::PathParameters {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
match *self {
|
||||
clean::PathParameters::AngleBracketed { ref lifetimes, ref types } => {
|
||||
if lifetimes.len() > 0 || types.len() > 0 {
|
||||
clean::PathParameters::AngleBracketed {
|
||||
ref lifetimes, ref types, ref bindings
|
||||
} => {
|
||||
if lifetimes.len() > 0 || types.len() > 0 || bindings.len() > 0 {
|
||||
try!(f.write_str("<"));
|
||||
let mut comma = false;
|
||||
for lifetime in lifetimes.iter() {
|
||||
|
@ -224,6 +226,13 @@ impl fmt::String for clean::PathParameters {
|
|||
comma = true;
|
||||
try!(write!(f, "{}", *ty));
|
||||
}
|
||||
for binding in bindings.iter() {
|
||||
if comma {
|
||||
try!(f.write_str(", "));
|
||||
}
|
||||
comma = true;
|
||||
try!(write!(f, "{}", *binding));
|
||||
}
|
||||
try!(f.write_str(">"));
|
||||
}
|
||||
}
|
||||
|
@ -717,6 +726,7 @@ impl fmt::String for clean::ViewListIdent {
|
|||
params: clean::PathParameters::AngleBracketed {
|
||||
lifetimes: Vec::new(),
|
||||
types: Vec::new(),
|
||||
bindings: Vec::new()
|
||||
}
|
||||
})
|
||||
};
|
||||
|
@ -727,6 +737,12 @@ impl fmt::String for clean::ViewListIdent {
|
|||
}
|
||||
}
|
||||
|
||||
impl fmt::String for clean::TypeBinding {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
write!(f, "{}={}", self.name, self.ty)
|
||||
}
|
||||
}
|
||||
|
||||
impl fmt::String for MutableSpace {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
match *self {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue