Skip to content

Commit

Permalink
Use newly-introduced mutability query for statics
Browse files Browse the repository at this point in the history
  • Loading branch information
Xanewok committed Apr 21, 2019
1 parent 65d88c7 commit 930f1e6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion clippy_lints/src/loops.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
},
_ => {},
Expand Down

0 comments on commit 930f1e6

Please sign in to comment.