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(
14531453 let remove_nested_parens = context. config . remove_nested_parens ( ) ;
14541454 loop {
14551455 // 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 ( ) ) ;
14571457 post_span = mk_sp ( subexpr. span . hi ( ) , span. hi ( ) - BytePos ( 1 ) ) ;
14581458 pre_comment = rewrite_missing_comment ( pre_span, shape, context) ?;
14591459 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