7
7
//!
8
8
//! We say a local has a stable address if its address has SSA-like properties:
9
9
//! 1/ It has a single `StorageLive` statement, or none at all (always-live);
10
- //! 2/ All its uses dominate this `StorageLive` statement .
10
+ //! 2/ This `StorageLive` statement dominates all statements that take this local's address .
11
11
//!
12
12
//! We do not discard borrowed locals from this analysis, as we cannot take their address' address.
13
13
@@ -247,7 +247,6 @@ impl<'tcx> Visitor<'tcx> for SsaVisitor {
247
247
// Only record if SSA-like, to avoid growing the vector needlessly.
248
248
self . assignment_order . push ( local) ;
249
249
}
250
- self . dominators . check_dominates ( & mut self . storage_live [ local] , loc) ;
251
250
}
252
251
// Anything can happen with raw pointers, so remove them.
253
252
// We do not verify that all uses of the borrow dominate the assignment to `local`,
@@ -264,7 +263,6 @@ impl<'tcx> Visitor<'tcx> for SsaVisitor {
264
263
}
265
264
PlaceContext :: NonMutatingUse ( _) => {
266
265
self . dominators . check_dominates ( & mut self . assignments [ local] , loc) ;
267
- self . dominators . check_dominates ( & mut self . storage_live [ local] , loc) ;
268
266
self . direct_uses [ local] += 1 ;
269
267
}
270
268
PlaceContext :: NonUse ( NonUseContext :: StorageLive ) => {
@@ -283,7 +281,6 @@ impl<'tcx> Visitor<'tcx> for SsaVisitor {
283
281
284
282
self . visit_projection ( place. as_ref ( ) , new_ctxt, loc) ;
285
283
self . dominators . check_dominates ( & mut self . assignments [ place. local ] , loc) ;
286
- self . dominators . check_dominates ( & mut self . storage_live [ place. local ] , loc) ;
287
284
}
288
285
return ;
289
286
} else {
0 commit comments