Remove support for gen arg
This commit is contained in:
parent
93172045c8
commit
09a5d319ab
68 changed files with 106 additions and 508 deletions
|
@ -2146,12 +2146,6 @@ impl<'a> Parser<'a> {
|
|||
assert!(self.eat_keyword(keywords::Catch));
|
||||
return self.parse_catch_expr(lo, attrs);
|
||||
}
|
||||
if self.is_gen_arg() {
|
||||
assert!(self.eat_keyword(keywords::Gen));
|
||||
assert!(self.eat_keyword(keywords::Arg));
|
||||
let hi = self.prev_span;
|
||||
return Ok(self.mk_expr(lo.to(hi), ExprKind::ImplArg, attrs));
|
||||
}
|
||||
if self.eat_keyword(keywords::Return) {
|
||||
if self.token.can_begin_expr() {
|
||||
let e = self.parse_expr()?;
|
||||
|
@ -3710,11 +3704,6 @@ impl<'a> Parser<'a> {
|
|||
self.look_ahead(1, |t| t.is_ident() && !t.is_reserved_ident())
|
||||
}
|
||||
|
||||
fn is_gen_arg(&self) -> bool {
|
||||
self.token.is_keyword(keywords::Gen) &&
|
||||
self.look_ahead(1, |t| t.is_keyword(keywords::Arg))
|
||||
}
|
||||
|
||||
fn is_defaultness(&self) -> bool {
|
||||
// `pub` is included for better error messages
|
||||
self.token.is_keyword(keywords::Default) &&
|
||||
|
@ -3818,8 +3807,7 @@ impl<'a> Parser<'a> {
|
|||
// Starts like a simple path, but not a union item.
|
||||
} else if self.token.is_path_start() &&
|
||||
!self.token.is_qpath_start() &&
|
||||
!self.is_union_item() &&
|
||||
!self.is_gen_arg() {
|
||||
!self.is_union_item() {
|
||||
let pth = self.parse_path(PathStyle::Expr)?;
|
||||
|
||||
if !self.eat(&token::Not) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue