Skip to content

Commit 46973c9

Browse files
committed
add FIXME's for a later refactoring
1 parent 0589cd0 commit 46973c9

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

compiler/rustc_codegen_ssa/src/mir/locals.rs

+1
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
6161
LocalRef::Operand(ref mut op) => {
6262
let local_ty = self.monomorphize(self.mir.local_decls[local].ty);
6363
if local_ty != op.layout.ty {
64+
// FIXME(#112651): This can be changed to an ICE afterwards.
6465
debug!("updating type of operand due to subtyping");
6566
with_no_trimmed_paths!(debug!(?op.layout.ty));
6667
with_no_trimmed_paths!(debug!(?local_ty));

compiler/rustc_mir_transform/src/dest_prop.rs

+5-3
Original file line numberDiff line numberDiff line change
@@ -768,16 +768,18 @@ impl<'tcx> Visitor<'tcx> for FindAssignments<'_, '_, 'tcx> {
768768
return;
769769
};
770770

771-
// As described at the top of the file, we do not go near things that have their address
772-
// taken.
771+
// As described at the top of the file, we do not go near things that have
772+
// their address taken.
773773
if self.borrowed.contains(src) || self.borrowed.contains(dest) {
774774
return;
775775
}
776776

777-
// As described at the top of this file, we do not touch locals which have different types.
777+
// As described at the top of this file, we do not touch locals which have
778+
// different types.
778779
let src_ty = self.body.local_decls()[src].ty;
779780
let dest_ty = self.body.local_decls()[dest].ty;
780781
if src_ty != dest_ty {
782+
// FIXME(#112651): This can be removed afterwards. Also update the module description.
781783
trace!("skipped `{src:?} = {dest:?}` due to subtyping: {src_ty} != {dest_ty}");
782784
return;
783785
}

compiler/rustc_mir_transform/src/ssa.rs

+1
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,7 @@ fn compute_copy_classes(ssa: &mut SsaLocals, body: &Body<'_>) {
274274
let local_ty = body.local_decls()[local].ty;
275275
let rhs_ty = body.local_decls()[rhs].ty;
276276
if local_ty != rhs_ty {
277+
// FIXME(#112651): This can be removed afterwards.
277278
trace!("skipped `{local:?} = {rhs:?}` due to subtyping: {local_ty} != {rhs_ty}");
278279
continue;
279280
}

0 commit comments

Comments
 (0)