Gate static coroutines behind a parser feature
This commit is contained in:
@@ -2401,8 +2401,12 @@ impl<'a> Parser<'a> {
|
||||
|
||||
let constness = self.parse_closure_constness();
|
||||
|
||||
let movability =
|
||||
if self.eat_keyword(exp!(Static)) { Movability::Static } else { Movability::Movable };
|
||||
let movability = if self.eat_keyword(exp!(Static)) {
|
||||
self.psess.gated_spans.gate(sym::coroutines, self.prev_token.span);
|
||||
Movability::Static
|
||||
} else {
|
||||
Movability::Movable
|
||||
};
|
||||
|
||||
let coroutine_kind = if self.token_uninterpolated_span().at_least_rust_2018() {
|
||||
self.parse_coroutine_kind(Case::Sensitive)
|
||||
|
||||
Reference in New Issue
Block a user