diff --git a/compiler/rustc_codegen_ssa/src/mir/locals.rs b/compiler/rustc_codegen_ssa/src/mir/locals.rs index b4eb8d0a687d5..da8bf5e7916a7 100644 --- a/compiler/rustc_codegen_ssa/src/mir/locals.rs +++ b/compiler/rustc_codegen_ssa/src/mir/locals.rs @@ -61,6 +61,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> { LocalRef::Operand(ref mut op) => { let local_ty = self.monomorphize(self.mir.local_decls[local].ty); if local_ty != op.layout.ty { + // FIXME(#112651): This can be changed to an ICE afterwards. debug!("updating type of operand due to subtyping"); with_no_trimmed_paths!(debug!(?op.layout.ty)); with_no_trimmed_paths!(debug!(?local_ty)); diff --git a/compiler/rustc_mir_transform/src/dest_prop.rs b/compiler/rustc_mir_transform/src/dest_prop.rs index 9faf2b03f62ba..a31551cf6199c 100644 --- a/compiler/rustc_mir_transform/src/dest_prop.rs +++ b/compiler/rustc_mir_transform/src/dest_prop.rs @@ -768,16 +768,18 @@ impl<'tcx> Visitor<'tcx> for FindAssignments<'_, '_, 'tcx> { return; }; - // As described at the top of the file, we do not go near things that have their address - // taken. + // As described at the top of the file, we do not go near things that have + // their address taken. if self.borrowed.contains(src) || self.borrowed.contains(dest) { return; } - // As described at the top of this file, we do not touch locals which have different types. + // As described at the top of this file, we do not touch locals which have + // different types. let src_ty = self.body.local_decls()[src].ty; let dest_ty = self.body.local_decls()[dest].ty; if src_ty != dest_ty { + // FIXME(#112651): This can be removed afterwards. Also update the module description. trace!("skipped `{src:?} = {dest:?}` due to subtyping: {src_ty} != {dest_ty}"); return; } diff --git a/compiler/rustc_mir_transform/src/ssa.rs b/compiler/rustc_mir_transform/src/ssa.rs index 5495e3532f76a..8dc2dfe13bd3b 100644 --- a/compiler/rustc_mir_transform/src/ssa.rs +++ b/compiler/rustc_mir_transform/src/ssa.rs @@ -274,6 +274,7 @@ fn compute_copy_classes(ssa: &mut SsaLocals, body: &Body<'_>) { let local_ty = body.local_decls()[local].ty; let rhs_ty = body.local_decls()[rhs].ty; if local_ty != rhs_ty { + // FIXME(#112651): This can be removed afterwards. trace!("skipped `{local:?} = {rhs:?}` due to subtyping: {local_ty} != {rhs_ty}"); continue; }