Skip to content

Commit 763703c

Browse files
committed
Remove redundant check for promoteds
For some time CTFE has been using a dedicated MIR which is never optimized, so the check for promoted became redundant.
1 parent 50f2c29 commit 763703c

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

compiler/rustc_mir_transform/src/uninhabited_enum_branching.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,6 @@ fn variant_discriminants<'tcx>(
7171

7272
impl<'tcx> MirPass<'tcx> for UninhabitedEnumBranching {
7373
fn run_pass(&self, tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
74-
if body.source.promoted.is_some() {
75-
return;
76-
}
77-
7874
trace!("UninhabitedEnumBranching starting for {:?}", body.source);
7975

8076
let basic_block_count = body.basic_blocks().len();

0 commit comments

Comments
 (0)