mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-10 00:47:45 +00:00
Avoid an indent for labelled loops.
This commit is contained in:
parent
809e5b5ed1
commit
9af08429f1
@ -485,12 +485,12 @@ impl<'a> State<'a> {
|
|||||||
self.print_block_with_attrs(body, attrs, cb, ib);
|
self.print_block_with_attrs(body, attrs, cb, ib);
|
||||||
}
|
}
|
||||||
ast::ExprKind::Loop(blk, opt_label, _) => {
|
ast::ExprKind::Loop(blk, opt_label, _) => {
|
||||||
|
let cb = self.cbox(0);
|
||||||
|
let ib = self.ibox(0);
|
||||||
if let Some(label) = opt_label {
|
if let Some(label) = opt_label {
|
||||||
self.print_ident(label.ident);
|
self.print_ident(label.ident);
|
||||||
self.word_space(":");
|
self.word_space(":");
|
||||||
}
|
}
|
||||||
let cb = self.cbox(0);
|
|
||||||
let ib = self.ibox(0);
|
|
||||||
self.word_nbsp("loop");
|
self.word_nbsp("loop");
|
||||||
self.print_block_with_attrs(blk, attrs, cb, ib);
|
self.print_block_with_attrs(blk, attrs, cb, ib);
|
||||||
}
|
}
|
||||||
|
@ -1526,12 +1526,12 @@ impl<'a> State<'a> {
|
|||||||
self.print_if(test, blk, elseopt);
|
self.print_if(test, blk, elseopt);
|
||||||
}
|
}
|
||||||
hir::ExprKind::Loop(blk, opt_label, _, _) => {
|
hir::ExprKind::Loop(blk, opt_label, _, _) => {
|
||||||
|
let cb = self.cbox(0);
|
||||||
|
let ib = self.ibox(0);
|
||||||
if let Some(label) = opt_label {
|
if let Some(label) = opt_label {
|
||||||
self.print_ident(label.ident);
|
self.print_ident(label.ident);
|
||||||
self.word_space(":");
|
self.word_space(":");
|
||||||
}
|
}
|
||||||
let cb = self.cbox(0);
|
|
||||||
let ib = self.ibox(0);
|
|
||||||
self.word_nbsp("loop");
|
self.word_nbsp("loop");
|
||||||
self.print_block(blk, cb, ib);
|
self.print_block(blk, cb, ib);
|
||||||
}
|
}
|
||||||
|
@ -189,8 +189,7 @@ mod expressions {
|
|||||||
let _t =
|
let _t =
|
||||||
match #[lang = "into_iter"](x) {
|
match #[lang = "into_iter"](x) {
|
||||||
mut iter =>
|
mut iter =>
|
||||||
'a:
|
'a: loop {
|
||||||
loop {
|
|
||||||
match #[lang = "next"](&mut iter) {
|
match #[lang = "next"](&mut iter) {
|
||||||
#[lang = "None"] {} => break,
|
#[lang = "None"] {} => break,
|
||||||
#[lang = "Some"] { 0: _ } => { }
|
#[lang = "Some"] { 0: _ } => { }
|
||||||
|
Loading…
Reference in New Issue
Block a user