Use newly-introduced mutability query for statics

Fixes fallout from https://github.com/rust-lang/rust/pull/60124.
cc https://github.com/rust-lang/rust/issues/60154
This commit is contained in:
Igor Matuszewski 2019-04-21 21:00:52 +02:00
parent 65d88c7ba7
commit 930f1e6129

View file

@ -2393,7 +2393,8 @@ impl<'a, 'tcx> VarCollectorVisitor<'a, 'tcx> {
Def::Local(node_id) | Def::Upvar(node_id, ..) => {
self.ids.insert(node_id);
},
Def::Static(def_id, mutable) => {
Def::Static(def_id) => {
let mutable = self.cx.tcx.is_mutable_static(def_id);
self.def_ids.insert(def_id, mutable);
},
_ => {},