Skip to content

Commit 4d88fe5

Browse files
committed
Auto merge of #138271 - mu001999-contrib:fix-138234, r=jackh726
Keep space if arg does not follow punctuation when lint unused parens Fixes rust-lang/rust#138234 If the arg follows punctuation, still pass `left_pos` with `None` and no space will be added, else then pass `left_pos` with `Some(arg.span.lo())`, so that we can add the space as expected. And `emit_unused_delims` can make sure no more space will be added if the expr follows space. --- Edited: Directly use the `value_span` to check whether the expr removed parens will follow identifier or be followed by identifier.
2 parents 24b2a32 + 0ecd5b5 commit 4d88fe5

File tree

0 file changed

+0
-0
lines changed

    0 file changed

    +0
    -0
    lines changed

    0 commit comments

    Comments
     (0)