]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_mir/dataflow/impls/borrows.rs
Promoteds are statics and statics have a place, not just a value
[rust.git] / src / librustc_mir / dataflow / impls / borrows.rs
index 5bf54286875a1f4ab1f7671d1b3ec5059621c8a9..f379e0cf1e4fc6c98b79af7083d0284d2f4f5d25 100644 (file)
@@ -259,6 +259,7 @@ fn statement_effect(&self, sets: &mut BlockSets<BorrowIndex>, location: Location
                     // Issue #46746: Two-phase borrows handles
                     // stmts of form `Tmp = &mut Borrow` ...
                     match lhs {
+                        Place::Promoted(_) |
                         Place::Local(..) | Place::Static(..) => {} // okay
                         Place::Projection(..) => {
                             // ... can assign into projections,