mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-30 18:53:39 +00:00
Use correct one line budget in rewrite_closure_block
This commit is contained in:
parent
f028cbe760
commit
0199e08367
@ -750,7 +750,7 @@ fn rewrite_closure_block(
|
||||
|
||||
// The body of the closure is big enough to be block indented, that
|
||||
// means we must re-format.
|
||||
let block_shape = shape.block().with_max_width(context.config);
|
||||
let block_shape = shape.block();
|
||||
let block_str = try_opt!(block.rewrite(&context, block_shape));
|
||||
Some(format!("{} {}", prefix, block_str))
|
||||
}
|
||||
|
@ -0,0 +1,5 @@
|
||||
// rustfmt-closure_block_indent_threshold: -1
|
||||
|
||||
fn issue1755() {
|
||||
b.iter(|| dfkljdklgjdlkfgjdlkgjldkjfgkdjgldjfgkljdfklgjlkdjfgkljdflkgjlkdfjgdjfsas::expect("parse"));
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
// rustfmt-closure_block_indent_threshold: -1
|
||||
|
||||
fn issue1755() {
|
||||
b.iter(|| {
|
||||
dfkljdklgjdlkfgjdlkgjldkjfgkdjgldjfgkljdfklgjlkdjfgkljdflkgjlkdfjgdjfsas::expect("parse")
|
||||
});
|
||||
}
|
Loading…
Reference in New Issue
Block a user