add FIXME's for a later refactoring

This commit is contained in:
lcnr 2023-06-19 09:16:26 +02:00
parent 0589cd0f0a
commit 46973c9c8a
3 changed files with 7 additions and 3 deletions

View file

@ -61,6 +61,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
LocalRef::Operand(ref mut op) => { LocalRef::Operand(ref mut op) => {
let local_ty = self.monomorphize(self.mir.local_decls[local].ty); let local_ty = self.monomorphize(self.mir.local_decls[local].ty);
if local_ty != op.layout.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"); debug!("updating type of operand due to subtyping");
with_no_trimmed_paths!(debug!(?op.layout.ty)); with_no_trimmed_paths!(debug!(?op.layout.ty));
with_no_trimmed_paths!(debug!(?local_ty)); with_no_trimmed_paths!(debug!(?local_ty));

View file

@ -768,16 +768,18 @@ impl<'tcx> Visitor<'tcx> for FindAssignments<'_, '_, 'tcx> {
return; return;
}; };
// As described at the top of the file, we do not go near things that have their address // As described at the top of the file, we do not go near things that have
// taken. // their address taken.
if self.borrowed.contains(src) || self.borrowed.contains(dest) { if self.borrowed.contains(src) || self.borrowed.contains(dest) {
return; 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 src_ty = self.body.local_decls()[src].ty;
let dest_ty = self.body.local_decls()[dest].ty; let dest_ty = self.body.local_decls()[dest].ty;
if src_ty != 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}"); trace!("skipped `{src:?} = {dest:?}` due to subtyping: {src_ty} != {dest_ty}");
return; return;
} }

View file

@ -274,6 +274,7 @@ fn compute_copy_classes(ssa: &mut SsaLocals, body: &Body<'_>) {
let local_ty = body.local_decls()[local].ty; let local_ty = body.local_decls()[local].ty;
let rhs_ty = body.local_decls()[rhs].ty; let rhs_ty = body.local_decls()[rhs].ty;
if local_ty != 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}"); trace!("skipped `{local:?} = {rhs:?}` due to subtyping: {local_ty} != {rhs_ty}");
continue; continue;
} }