mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-17 05:25:37 +03:00
Remove anon trait params from 2018 and beyond
This commit is contained in:
@@ -1376,7 +1376,13 @@ fn parse_trait_item_(&mut self,
|
||||
// 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()?;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user