We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 727eabd commit d2dfc9cCopy full SHA for d2dfc9c
src/libsyntax/parse/parser.rs
@@ -1376,7 +1376,13 @@ impl<'a> Parser<'a> {
1376
// This is somewhat dubious; We don't want to allow
1377
// argument names to be left off if there is a
1378
// definition...
1379
- p.parse_arg_general(false)
+
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
+ }
1386
})?;
1387
generics.where_clause = self.parse_where_clause()?;
1388
0 commit comments