Skip to content

Commit bde5280

Browse files
committed
Update pretty-printing of '...' in record patterns to be ', _' instead
1 parent a5ec51d commit bde5280

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/comp/syntax/print/pprust.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -1160,7 +1160,10 @@ fn print_pat(&ps s, &@ast::pat pat) {
11601160
ret f.pat.span;
11611161
}
11621162
commasep_cmnt_ivec(s, consistent, fields, print_field, get_span);
1163-
if (etc) { space(s.s); word(s.s, "..."); }
1163+
if (etc) {
1164+
if (ivec::len(fields) != 0u) { word_space(s, ","); }
1165+
word(s.s, "_");
1166+
}
11641167
word(s.s, "}");
11651168
}
11661169
}

0 commit comments

Comments
 (0)