diff options
| author | Tomasz Miąsko <tomasz.miasko@gmail.com> | 2021-10-11 00:00:00 +0000 |
|---|---|---|
| committer | Tomasz Miąsko <tomasz.miasko@gmail.com> | 2021-11-20 10:12:04 +0100 |
| commit | 763703cb7696d51b83bb8507e5a74a31144ac782 (patch) | |
| tree | 1583378109ca6d56550f24c0f5eb442f5e872db4 | |
| parent | 50f2c292007f9364908e4b8344886797f0144648 (diff) | |
| download | rust-763703cb7696d51b83bb8507e5a74a31144ac782.tar.gz rust-763703cb7696d51b83bb8507e5a74a31144ac782.zip | |
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.
| -rw-r--r-- | compiler/rustc_mir_transform/src/uninhabited_enum_branching.rs | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/compiler/rustc_mir_transform/src/uninhabited_enum_branching.rs b/compiler/rustc_mir_transform/src/uninhabited_enum_branching.rs index 2aa50611290..961c5009ac5 100644 --- a/compiler/rustc_mir_transform/src/uninhabited_enum_branching.rs +++ b/compiler/rustc_mir_transform/src/uninhabited_enum_branching.rs @@ -71,10 +71,6 @@ fn variant_discriminants<'tcx>( impl<'tcx> MirPass<'tcx> for UninhabitedEnumBranching { fn run_pass(&self, tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) { - if body.source.promoted.is_some() { - return; - } - trace!("UninhabitedEnumBranching starting for {:?}", body.source); let basic_block_count = body.basic_blocks().len(); |
