}
hir::TyKind::Tup(ref elts) => {
self.popen();
- self.commasep(Inconsistent, &elts[..], |s, ty| s.print_type(&ty));
+ self.commasep(Inconsistent, &elts, |s, ty| s.print_type(&ty));
if elts.len() == 1 {
self.word(",");
}
hir::ExprKind::Path(ref qpath) => self.print_qpath(qpath, true),
hir::ExprKind::Break(destination, ref opt_expr) => {
self.word("break");
- self.space();
if let Some(label) = destination.label {
- self.print_ident(label.ident);
self.space();
+ self.print_ident(label.ident);
}
if let Some(ref expr) = *opt_expr {
- self.print_expr_maybe_paren(expr, parser::PREC_JUMP);
self.space();
+ self.print_expr_maybe_paren(expr, parser::PREC_JUMP);
}
}
hir::ExprKind::Continue(destination) => {
self.word("continue");
- self.space();
if let Some(label) = destination.label {
+ self.space();
self.print_ident(label.ident);
- self.space()
}
}
hir::ExprKind::Ret(ref result) => {
colons_before_params,
)
}
- hir::QPath::LangItem(lang_item, span) => {
+ hir::QPath::LangItem(lang_item, span, _) => {
self.word("#[lang = \"");
self.print_ident(Ident::new(lang_item.name(), span));
self.word("\"]");
self.commasep(Inconsistent, &elts[ddpos..], |s, p| s.print_pat(&p));
}
} else {
- self.commasep(Inconsistent, &elts[..], |s, p| s.print_pat(&p));
+ self.commasep(Inconsistent, &elts, |s, p| s.print_pat(&p));
}
self.pclose();
}
self.word_space("{");
self.commasep_cmnt(
Consistent,
- &fields[..],
+ &fields,
|s, f| {
s.cbox(INDENT_UNIT);
if !f.is_shorthand {
self.word("}");
}
PatKind::Or(ref pats) => {
- self.strsep("|", true, Inconsistent, &pats[..], |s, p| s.print_pat(&p));
+ self.strsep("|", true, Inconsistent, &pats, |s, p| s.print_pat(&p));
}
PatKind::Tuple(ref elts, ddpos) => {
self.popen();
}
PatKind::Slice(ref before, ref slice, ref after) => {
self.word("[");
- self.commasep(Inconsistent, &before[..], |s, p| s.print_pat(&p));
+ self.commasep(Inconsistent, &before, |s, p| s.print_pat(&p));
if let Some(ref p) = *slice {
if !before.is_empty() {
self.word_space(",");
self.word_space(",");
}
}
- self.commasep(Inconsistent, &after[..], |s, p| s.print_pat(&p));
+ self.commasep(Inconsistent, &after, |s, p| s.print_pat(&p));
self.word("]");
}
}