Skip to content

Commit 332d295

Browse files
Rollup merge of #145234 - dianne:1-tuple-witnesses, r=jackh726
match exhaustiveness diagnostics: show a trailing comma on singleton tuple consructors in witness patterns (and clean up a little) Constructor patterns of type `(T,)` are written `(pat,)`, not `(pat)`. However, exhaustiveness/usefulness diagnostics would print them as `(pat)` when e.g. providing a witness of non-exhaustiveness and suggesting adding arms to make matches exhaustive; this would result in an error when applied. rust-analyzer already prints the trailing comma, so it doesn't need changing. This also includes some cleanup in the second commit, with justification in the commit message.
2 parents 512f093 + 0b5c55e commit 332d295

File tree

0 file changed

+0
-0
lines changed

    0 file changed

    +0
    -0
    lines changed

    0 commit comments

    Comments
     (0)