@@ -75,7 +75,10 @@ struct InvalidationGenerator<'cg, 'cx: 'cg, 'tcx: 'cx, 'gcx: 'tcx> {
75
75
/// Visits the whole MIR and generates invalidates() facts
76
76
/// Most of the code implementing this was stolen from borrow_check/mod.rs
77
77
impl < ' cg , ' cx , ' tcx , ' gcx > Visitor < ' tcx > for InvalidationGenerator < ' cg , ' cx , ' tcx , ' gcx > {
78
- fn visit_statement ( & mut self , block : BasicBlock , statement : & Statement < ' tcx > , location : Location ) {
78
+ fn visit_statement ( & mut self ,
79
+ block : BasicBlock ,
80
+ statement : & Statement < ' tcx > ,
81
+ location : Location ) {
79
82
match statement. kind {
80
83
StatementKind :: Assign ( ref lhs, ref rhs) => {
81
84
self . consume_rvalue (
@@ -236,7 +239,7 @@ impl<'cg, 'cx, 'tcx, 'gcx> Visitor<'tcx> for InvalidationGenerator<'cg, 'cx, 'tc
236
239
} => {
237
240
self . consume_operand ( ContextKind :: Yield . new ( location) , value) ;
238
241
239
- // ** TODO (bob_twinkles) figure out what the equivalent of this is
242
+ // ** FIXME (bob_twinkles) figure out what the equivalent of this is
240
243
// if self.movable_generator {
241
244
// // Look for any active borrows to locals
242
245
// let borrow_set = self.borrow_set.clone();
@@ -249,8 +252,9 @@ impl<'cg, 'cx, 'tcx, 'gcx> Visitor<'tcx> for InvalidationGenerator<'cg, 'cx, 'tc
249
252
// }
250
253
}
251
254
TerminatorKind :: Resume | TerminatorKind :: Return | TerminatorKind :: GeneratorDrop => {
252
- // ** TODO(bob_twinkles) figure out what the equivalent of this is
253
- // // Returning from the function implicitly kills storage for all locals and statics.
255
+ // ** FIXME(bob_twinkles) figure out what the equivalent of this is
256
+ // // Returning from the function implicitly kills storage for all locals and
257
+ // // statics.
254
258
// // Often, the storage will already have been killed by an explicit
255
259
// // StorageDead, but we don't always emit those (notably on unwind paths),
256
260
// // so this "extra check" serves as a kind of backup.
@@ -826,7 +830,8 @@ impl<'cg, 'cx, 'tcx, 'gcx> InvalidationGenerator<'cg, 'cx, 'tcx, 'gcx> {
826
830
if static1. def_id != static2. def_id {
827
831
debug ! ( "place_element_conflict: DISJOINT-STATIC" ) ;
828
832
Overlap :: Disjoint
829
- } else if self . infcx . tcx . is_static ( static1. def_id ) == Some ( hir:: Mutability :: MutMutable ) {
833
+ } else if self . infcx . tcx . is_static ( static1. def_id ) ==
834
+ Some ( hir:: Mutability :: MutMutable ) {
830
835
// We ignore mutable statics - they can only be unsafe code.
831
836
debug ! ( "place_element_conflict: IGNORE-STATIC-MUT" ) ;
832
837
Overlap :: Disjoint
0 commit comments