1
Fork 0

Make inline const work for half open ranges

This commit is contained in:
Santiago Pastorino 2020-10-19 18:44:37 -03:00
parent f8842b9bac
commit 83abed9df6
No known key found for this signature in database
GPG key ID: 8131A24E0C79EFAF
4 changed files with 19 additions and 9 deletions

View file

@ -1062,7 +1062,7 @@ impl<'a> Parser<'a> {
})
} else if self.eat_keyword(kw::Unsafe) {
self.parse_block_expr(None, lo, BlockCheckMode::Unsafe(ast::UserProvided), attrs)
} else if self.check_inline_const() {
} else if self.check_inline_const(0) {
self.parse_const_block(lo.to(self.token.span))
} else if self.is_do_catch_block() {
self.recover_do_catch(attrs)