Skip to content

Commit f77d107

Browse files
Match MIR statements exhaustively
1 parent 7d6b8c4 commit f77d107

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/librustc_mir/dataflow/impls/storage_liveness.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,14 @@ impl<'mir, 'tcx> BitDenotation<'tcx> for RequiresStorage<'mir, 'tcx> {
129129
sets.gen(place.local);
130130
}
131131
}
132-
_ => (),
132+
133+
// Nothing to do for these. Match exhaustively so this fails to compile when new
134+
// variants are added.
135+
StatementKind::AscribeUserType(..)
136+
| StatementKind::FakeRead(..)
137+
| StatementKind::Nop
138+
| StatementKind::Retag(..)
139+
| StatementKind::StorageLive(..) => {}
133140
}
134141
}
135142

0 commit comments

Comments
 (0)