Skip to content

Commit

Permalink
Remove anon trait params from 2018 and beyond
Browse files Browse the repository at this point in the history
  • Loading branch information
mark-i-m committed Aug 24, 2018
1 parent 727eabd commit d2dfc9c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/libsyntax/parse/parser.rs
Expand Up @@ -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()?;

Expand Down

0 comments on commit d2dfc9c

Please sign in to comment.