about summary refs log tree commit diff
path: root/src/libsyntax/parse/parser.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2019-04-21 13:40:22 +0000
committerbors <bors@rust-lang.org>2019-04-21 13:40:22 +0000
commit31a75a172859d906d8e6a34af4afff9830af495c (patch)
treeebc94a1a8d740f638ea3839716314c7adf41c40c /src/libsyntax/parse/parser.rs
parent06a271a6eb5521d50cbe20a782a20e7c993e7725 (diff)
parent4eb94b44072697be70fc2a74ed9989e88f9cd70c (diff)
downloadrust-31a75a172859d906d8e6a34af4afff9830af495c.tar.gz
rust-31a75a172859d906d8e6a34af4afff9830af495c.zip
Auto merge of #60124 - petrochenkov:stanomut, r=eddyb
Remove mutability from `Def::Static`

Querify `TyCtxt::is_static`.
Use `Mutability` instead of bool in foreign statics in AST/HIR.

cc https://github.com/rust-lang/rust/pull/60110
r? @eddyb
Diffstat (limited to 'src/libsyntax/parse/parser.rs')
-rw-r--r--src/libsyntax/parse/parser.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index 8d2beaa69dd..824192f0739 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -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()?;