File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
src/tools/miri/src/shims/native_lib Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ use libffi::low::CodePtr;
77use libffi:: middle:: Type as FfiType ;
88use rustc_abi:: { HasDataLayout , Size } ;
99use rustc_data_structures:: either;
10- use rustc_middle:: ty:: layout:: TyAndLayout ;
10+ use rustc_middle:: ty:: layout:: { HasTypingEnv , TyAndLayout } ;
1111use rustc_middle:: ty:: { self , IntTy , Ty , UintTy } ;
1212use rustc_span:: Symbol ;
1313use serde:: { Deserialize , Serialize } ;
@@ -144,7 +144,7 @@ trait EvalContextExtPriv<'tcx>: crate::MiriInterpCxExt<'tcx> {
144144 unsafe { ffi:: call :: < ( ) > ( fun, libffi_args) } ;
145145 return interp_ok ( ImmTy :: uninit ( dest. layout ) ) ;
146146 }
147- ty:: RawPtr ( .. ) => {
147+ ty:: RawPtr ( ty , .. ) if ty . is_sized ( * this . tcx , this . typing_env ( ) ) => {
148148 let x = unsafe { ffi:: call :: < * const ( ) > ( fun, libffi_args) } ;
149149 let ptr = StrictPointer :: new ( Provenance :: Wildcard , Size :: from_bytes ( x. addr ( ) ) ) ;
150150 Scalar :: from_pointer ( ptr, this)
You can’t perform that action at this time.
0 commit comments