File tree 1 file changed +1
-5
lines changed
compiler/rustc_const_eval/src/interpret
1 file changed +1
-5
lines changed Original file line number Diff line number Diff line change @@ -736,20 +736,16 @@ where
736
736
dest : & MPlaceTy < ' tcx , M :: PointerTag > ,
737
737
) -> InterpResult < ' tcx > {
738
738
// Note that it is really important that the type here is the right one, and matches the
739
- // type things are read at. In case `src_val ` is a `ScalarPair`, we don't do any magic here
739
+ // type things are read at. In case `value ` is a `ScalarPair`, we don't do any magic here
740
740
// to handle padding properly, which is only correct if we never look at this data with the
741
741
// wrong type.
742
742
743
- // Invalid places are a thing: the return place of a diverging function
744
743
let tcx = * self . tcx ;
745
744
let Some ( mut alloc) = self . get_place_alloc_mut ( dest) ? else {
746
745
// zero-sized access
747
746
return Ok ( ( ) ) ;
748
747
} ;
749
748
750
- // FIXME: We should check that there are dest.layout.size many bytes available in
751
- // memory. The code below is not sufficient, with enough padding it might not
752
- // cover all the bytes!
753
749
match value {
754
750
Immediate :: Scalar ( scalar) => {
755
751
let Abi :: Scalar ( s) = dest. layout . abi else { span_bug ! (
You can’t perform that action at this time.
0 commit comments