Skip to content

Commit 6a2987b

Browse files
Ignore FakeReadCause::ForLet in liveness
1 parent 335fb69 commit 6a2987b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/librustc_mir/dataflow/impls/liveness.rs

+3
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ impl GenKillAnalysis<'tcx> for MaybeLiveLocals {
4949
statement: &mir::Statement<'tcx>,
5050
location: Location,
5151
) {
52+
if let mir::StatementKind::FakeRead(mir::FakeReadCause::ForLet, _) = statement.kind {
53+
return;
54+
}
5255
self.transfer_function(trans).visit_statement(statement, location);
5356
}
5457

0 commit comments

Comments
 (0)