diff options
| author | Mark Mansi <markm@cs.wisc.edu> | 2018-08-22 13:43:04 -0500 |
|---|---|---|
| committer | Mark Mansi <markm@cs.wisc.edu> | 2018-08-24 15:48:00 -0500 |
| commit | d2dfc9cea3c221bbbfc4195a50471882f85ca42f (patch) | |
| tree | 392a3f9133bc482db1f16c3208c3f78a34afc22b /src/libsyntax | |
| parent | 727eabd68143e968d8826ee29b8ea7792d29fa96 (diff) | |
| download | rust-d2dfc9cea3c221bbbfc4195a50471882f85ca42f.tar.gz rust-d2dfc9cea3c221bbbfc4195a50471882f85ca42f.zip | |
Remove anon trait params from 2018 and beyond
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 725360b842d..a8f65cee513 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -1376,7 +1376,13 @@ impl<'a> Parser<'a> { // This is somewhat dubious; We don't want to allow // argument names to be left off if there is a // definition... - p.parse_arg_general(false) + + // We don't allow argument names to be left off in edition 2018. + if self.span.edition() >= Edition::Edition2018 { + p.parse_arg_general(true) + } else { + p.parse_arg_general(false) + } })?; generics.where_clause = self.parse_where_clause()?; |
