File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -1453,7 +1453,7 @@ pub(crate) fn rewrite_paren(
1453
1453
let remove_nested_parens = context. config . remove_nested_parens ( ) ;
1454
1454
loop {
1455
1455
// 1 = "(" or ")"
1456
- pre_span = mk_sp ( span. lo ( ) + BytePos ( 1 ) , subexpr. span . lo ( ) ) ;
1456
+ pre_span = mk_sp ( span. lo ( ) + BytePos ( 1 ) , subexpr. span ( ) . lo ( ) ) ;
1457
1457
post_span = mk_sp ( subexpr. span . hi ( ) , span. hi ( ) - BytePos ( 1 ) ) ;
1458
1458
pre_comment = rewrite_missing_comment ( pre_span, shape, context) ?;
1459
1459
post_comment = rewrite_missing_comment ( post_span, shape, context) ?;
Original file line number Diff line number Diff line change
1
+ #![ feature( stmt_expr_attributes) ]
2
+ fn okay ( ) -> u32 {
3
+ (
4
+ // Comments in parentheses-expressions caused attributes to be duplicated.
5
+ #[ allow( unused_variables) ]
6
+ 0
7
+ )
8
+ }
You can’t perform that action at this time.
0 commit comments