Skip to content

Commit addac4a

Browse files
committed
Auto merge of #4014 - Xanewok:rustup-60124, r=matthiaskrgr
rustup: Use newly-introduced mutability query for statics Fixes fallout from rust-lang/rust#60124. cc rust-lang/rust#60154 changelog: none
2 parents 65d88c7 + 930f1e6 commit addac4a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

clippy_lints/src/loops.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -2393,7 +2393,8 @@ impl<'a, 'tcx> VarCollectorVisitor<'a, 'tcx> {
23932393
Def::Local(node_id) | Def::Upvar(node_id, ..) => {
23942394
self.ids.insert(node_id);
23952395
},
2396-
Def::Static(def_id, mutable) => {
2396+
Def::Static(def_id) => {
2397+
let mutable = self.cx.tcx.is_mutable_static(def_id);
23972398
self.def_ids.insert(def_id, mutable);
23982399
},
23992400
_ => {},

0 commit comments

Comments
 (0)