Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
sinkuu committed Mar 24, 2018
1 parent dc7eb0e commit 4800afa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 14 deletions.
3 changes: 2 additions & 1 deletion src/librustdoc/clean/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1901,7 +1901,8 @@ impl<'a, 'tcx> Clean<FnDecl> for (DefId, ty::PolyFnSig<'tcx>) {
vec![].into_iter()
} else {
cx.tcx.fn_arg_names(did).into_iter()
}.peekable();
};

FnDecl {
output: Return(sig.skip_binder().output().clean(cx)),
attrs: Attributes::default(),
Expand Down
15 changes: 2 additions & 13 deletions src/librustdoc/html/format.rs
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,7 @@ fn fmt_type(t: &clean::Type, f: &mut fmt::Formatter, use_absolute: bool) -> fmt:
}
many => {
primitive_link(f, PrimitiveType::Tuple, "(")?;
fmt::Display::fmt(&CommaSep(&many), f)?;
fmt::Display::fmt(&CommaSep(many), f)?;
primitive_link(f, PrimitiveType::Tuple, ")")
}
}
Expand Down Expand Up @@ -667,18 +667,7 @@ fn fmt_type(t: &clean::Type, f: &mut fmt::Formatter, use_absolute: bool) -> fmt:
}
}
clean::ImplTrait(ref bounds) => {
write!(f, "impl ")?;
for (i, bound) in bounds.iter().enumerate() {
if i != 0 {
write!(f, " + ")?;
}
if f.alternate() {
write!(f, "{:#}", *bound)?;
} else {
write!(f, "{}", *bound)?;
}
}
Ok(())
write!(f, "impl {}", TyParamBounds(bounds))
}
clean::QPath { ref name, ref self_type, ref trait_ } => {
let should_show_cast = match *trait_ {
Expand Down

0 comments on commit 4800afa

Please sign in to comment.