提交 46973c9c 编写于 作者: L lcnr

add FIXME's for a later refactoring

上级 0589cd0f
......@@ -61,6 +61,7 @@ pub(super) fn overwrite_local(
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));
......
......@@ -768,16 +768,18 @@ fn visit_statement(&mut self, statement: &Statement<'tcx>, _: Location) {
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;
}
......
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册