@@ -911,7 +911,7 @@ where
911
911
// that might e.g., be an inner field of a struct with `Scalar` layout,
912
912
// that has different alignment than the outer field.
913
913
let local_layout = self . layout_of_local ( & self . stack [ frame] , local) ?;
914
- let ptr = self . allocate ( local_layout, MemoryKind :: Stack ) ? ;
914
+ let ptr = self . allocate ( local_layout, MemoryKind :: Stack ) ;
915
915
// We don't have to validate as we can assume the local
916
916
// was already valid for its type.
917
917
self . write_immediate_to_mplace_no_validate ( value, ptr) ?;
@@ -933,15 +933,15 @@ where
933
933
& mut self ,
934
934
layout : TyLayout < ' tcx > ,
935
935
kind : MemoryKind < M :: MemoryKinds > ,
936
- ) -> EvalResult < ' tcx , MPlaceTy < ' tcx , M :: PointerTag > > {
936
+ ) -> MPlaceTy < ' tcx , M :: PointerTag > {
937
937
if layout. is_unsized ( ) {
938
938
assert ! ( self . tcx. features( ) . unsized_locals, "cannot alloc memory for unsized type" ) ;
939
939
// FIXME: What should we do here? We should definitely also tag!
940
- Ok ( MPlaceTy :: dangling ( layout, self ) )
940
+ MPlaceTy :: dangling ( layout, self )
941
941
} else {
942
- let ptr = self . memory . allocate ( layout. size , layout. align . abi , kind) ? ;
943
- let ptr = M :: tag_new_allocation ( self , ptr, kind) ? ;
944
- Ok ( MPlaceTy :: from_aligned_ptr ( ptr, layout) )
942
+ let ptr = self . memory . allocate ( layout. size , layout. align . abi , kind) ;
943
+ let ptr = M :: tag_new_allocation ( self , ptr, kind) ;
944
+ MPlaceTy :: from_aligned_ptr ( ptr, layout)
945
945
}
946
946
}
947
947
0 commit comments