提交 4800afa5 编写于 作者: S Shotaro Yamada

Cleanup

上级 dc7eb0ea
......@@ -1901,7 +1901,8 @@ fn clean(&self, cx: &DocContext) -> FnDecl {
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(),
......
......@@ -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, ")")
}
}
......@@ -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_ {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册