Skip to content

Commit 249abcd

Browse files
committed
test: Do not generate poison
1 parent 292fd09 commit 249abcd

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

compiler/rustc_codegen_ssa/src/mir/statement.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -142,13 +142,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
142142
(place_ref.val, layout, &place.projection[1..])
143143
}
144144
_ => {
145-
// If the address cannot be computed, use poison to indicate that the value has been optimized out.
146-
let ty = self.monomorphize(self.mir.local_decls[*dest].ty);
147-
let layout = bx.cx().layout_of(ty);
148-
let to_backend_ty = bx.cx().immediate_backend_type(layout);
149-
let place_ref =
150-
PlaceRef::new_sized(bx.cx().const_poison(to_backend_ty), layout);
151-
(place_ref.val, layout, [].as_slice())
145+
return;
152146
}
153147
};
154148
self.debug_new_value_to_local(bx, *dest, val, layout, projection);

0 commit comments

Comments
 (0)