Skip to content

Commit d2dfc9c

Browse files
committed
Remove anon trait params from 2018 and beyond
1 parent 727eabd commit d2dfc9c

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/libsyntax/parse/parser.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1376,7 +1376,13 @@ impl<'a> Parser<'a> {
13761376
// This is somewhat dubious; We don't want to allow
13771377
// argument names to be left off if there is a
13781378
// definition...
1379-
p.parse_arg_general(false)
1379+
1380+
// We don't allow argument names to be left off in edition 2018.
1381+
if self.span.edition() >= Edition::Edition2018 {
1382+
p.parse_arg_general(true)
1383+
} else {
1384+
p.parse_arg_general(false)
1385+
}
13801386
})?;
13811387
generics.where_clause = self.parse_where_clause()?;
13821388

0 commit comments

Comments
 (0)