Pretty print async block without redundant space
This commit is contained in:
parent
a9f14c18fa
commit
33c29a3ad3
3 changed files with 5 additions and 6 deletions
|
@ -2068,7 +2068,6 @@ impl<'a> State<'a> {
|
|||
ast::ExprKind::Async(capture_clause, _, ref blk) => {
|
||||
self.word_nbsp("async");
|
||||
self.print_capture_clause(capture_clause);
|
||||
self.s.space();
|
||||
// cbox/ibox in analogy to the `ExprKind::Block` arm above
|
||||
self.cbox(INDENT_UNIT);
|
||||
self.ibox(0);
|
||||
|
|
|
@ -3,5 +3,5 @@
|
|||
// edition:2018
|
||||
// pp-exact
|
||||
|
||||
fn main() { let _a = (async { }); }
|
||||
fn main() { let _a = (async { }); }
|
||||
//~^ WARNING unnecessary parentheses around assigned value
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
warning: unnecessary parentheses around assigned value
|
||||
--> $DIR/issue-54752-async-block.rs:6:22
|
||||
|
|
||||
LL | fn main() { let _a = (async { }); }
|
||||
| ^ ^
|
||||
LL | fn main() { let _a = (async { }); }
|
||||
| ^ ^
|
||||
|
|
||||
= note: `#[warn(unused_parens)]` on by default
|
||||
help: remove these parentheses
|
||||
|
|
||||
LL - fn main() { let _a = (async { }); }
|
||||
LL + fn main() { let _a = async { }; }
|
||||
LL - fn main() { let _a = (async { }); }
|
||||
LL + fn main() { let _a = async { }; }
|
||||
|
|
||||
|
||||
warning: 1 warning emitted
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue