1
Fork 0

AST/HIR: Use Mutability instead of bool in foreign statics

This commit is contained in:
Vadim Petrochenkov 2019-04-21 15:29:58 +03:00
parent 53ffcd96b7
commit 4eb94b4407
10 changed files with 14 additions and 16 deletions

View file

@ -7683,7 +7683,7 @@ impl<'a> Parser<'a> {
/// Assumes that the `static` keyword is already parsed.
fn parse_item_foreign_static(&mut self, vis: ast::Visibility, lo: Span, attrs: Vec<Attribute>)
-> PResult<'a, ForeignItem> {
let mutbl = self.eat_keyword(keywords::Mut);
let mutbl = self.parse_mutability();
let ident = self.parse_ident()?;
self.expect(&token::Colon)?;
let ty = self.parse_ty()?;