Skip to content

Commit 2985f74

Browse files
committed
s/one_tuple/trailing_comma (more accurate name)
1 parent aa34640 commit 2985f74

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/libsyntax/parse/parser.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1181,7 +1181,7 @@ pub impl Parser {
11811181
self.bump();
11821182
// (e) is parenthesized e
11831183
// (e,) is a tuple with only one field, e
1184-
let mut one_tuple = false;
1184+
let mut trailing_comma = false;
11851185
if *self.token == token::RPAREN {
11861186
hi = self.span.hi;
11871187
self.bump();
@@ -1195,13 +1195,13 @@ pub impl Parser {
11951195
es.push(self.parse_expr());
11961196
}
11971197
else {
1198-
one_tuple = true;
1198+
trailing_comma = true;
11991199
}
12001200
}
12011201
hi = self.span.hi;
12021202
self.expect(&token::RPAREN);
12031203

1204-
return if es.len() == 1 && !one_tuple {
1204+
return if es.len() == 1 && !trailing_comma {
12051205
self.mk_expr(lo, self.span.hi, expr_paren(es[0]))
12061206
}
12071207
else {

0 commit comments

Comments
 (0)