Skip to content

Commit 26cd262

Browse files
committed
Check on the other side too
1 parent 21e9f94 commit 26cd262

File tree

1 file changed

+4
-1
lines changed
  • compiler/rustc_mir_transform/src

1 file changed

+4
-1
lines changed

compiler/rustc_mir_transform/src/lib.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -851,7 +851,10 @@ pub fn build_codegen_mir<'tcx>(tcx: TyCtxt<'tcx>, instance: Instance<'tcx>) -> &
851851
vis.visit_body(&body);
852852

853853
// MIR for monomorphic defs has already been fully optimized in optimized_mir.
854-
let body = if instance.args.non_erasable_generics().next().is_some() || vis.contains_ubcheck {
854+
let body = if instance.args.non_erasable_generics().next().is_some()
855+
|| vis.contains_ubcheck
856+
|| vis.contains_alias
857+
{
855858
let mut body = instance.instantiate_mir_and_normalize_erasing_regions(
856859
tcx,
857860
ty::TypingEnv::fully_monomorphized(),

0 commit comments

Comments
 (0)