Skip to content

Commit 0e68cbd

Browse files
committed
Remove useless special case.
1 parent 4096619 commit 0e68cbd

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

compiler/rustc_mir_transform/src/dataflow_const_prop.rs

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -520,21 +520,6 @@ impl<'tcx, 'map, 'a> Visitor<'tcx> for OperandCollector<'tcx, 'map, 'a> {
520520
_ => (),
521521
}
522522
}
523-
524-
fn visit_rvalue(&mut self, rvalue: &Rvalue<'tcx>, location: Location) {
525-
match rvalue {
526-
Rvalue::Discriminant(place) => {
527-
match self.state.get_discr(place.as_ref(), self.visitor.map) {
528-
FlatSet::Top => (),
529-
FlatSet::Elem(value) => {
530-
self.visitor.before_effect.insert((location, *place), value);
531-
}
532-
FlatSet::Bottom => (),
533-
}
534-
}
535-
_ => self.super_rvalue(rvalue, location),
536-
}
537-
}
538523
}
539524

540525
struct DummyMachine;

0 commit comments

Comments
 (0)