Skip to content

Commit a82c097

Browse files
Fix tidy errors
1 parent 0c902cf commit a82c097

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

src/librustc_mir/borrow_check/nll/invalidation.rs

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,10 @@ struct InvalidationGenerator<'cg, 'cx: 'cg, 'tcx: 'cx, 'gcx: 'tcx> {
7575
/// Visits the whole MIR and generates invalidates() facts
7676
/// Most of the code implementing this was stolen from borrow_check/mod.rs
7777
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) {
7982
match statement.kind {
8083
StatementKind::Assign(ref lhs, ref rhs) => {
8184
self.consume_rvalue(
@@ -236,7 +239,7 @@ impl<'cg, 'cx, 'tcx, 'gcx> Visitor<'tcx> for InvalidationGenerator<'cg, 'cx, 'tc
236239
} => {
237240
self.consume_operand(ContextKind::Yield.new(location), value);
238241

239-
// ** TODO(bob_twinkles) figure out what the equivalent of this is
242+
// ** FIXME(bob_twinkles) figure out what the equivalent of this is
240243
// if self.movable_generator {
241244
// // Look for any active borrows to locals
242245
// let borrow_set = self.borrow_set.clone();
@@ -249,8 +252,9 @@ impl<'cg, 'cx, 'tcx, 'gcx> Visitor<'tcx> for InvalidationGenerator<'cg, 'cx, 'tc
249252
// }
250253
}
251254
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.
254258
// // Often, the storage will already have been killed by an explicit
255259
// // StorageDead, but we don't always emit those (notably on unwind paths),
256260
// // so this "extra check" serves as a kind of backup.
@@ -826,7 +830,8 @@ impl<'cg, 'cx, 'tcx, 'gcx> InvalidationGenerator<'cg, 'cx, 'tcx, 'gcx> {
826830
if static1.def_id != static2.def_id {
827831
debug!("place_element_conflict: DISJOINT-STATIC");
828832
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) {
830835
// We ignore mutable statics - they can only be unsafe code.
831836
debug!("place_element_conflict: IGNORE-STATIC-MUT");
832837
Overlap::Disjoint

0 commit comments

Comments
 (0)