File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -619,7 +619,7 @@ pub fn miri_to_const<'tcx>(tcx: TyCtxt<'tcx>, result: mir::ConstantKind<'tcx>) -
619619 } ,
620620 mir:: ConstantKind :: Val ( ConstValue :: ByRef { alloc, offset : _ } , _) => match result. ty ( ) . kind ( ) {
621621 ty:: Array ( sub_type, len) => match sub_type. kind ( ) {
622- ty:: Float ( FloatTy :: F32 ) => match len. try_eval_usize ( tcx , ty :: ParamEnv :: empty ( ) ) {
622+ ty:: Float ( FloatTy :: F32 ) => match len. to_valtree ( ) . try_to_machine_usize ( tcx ) {
623623 Some ( len) => alloc
624624 . inner ( )
625625 . inspect_with_uninit_and_ptr_outside_interpreter ( 0 ..( 4 * len as usize ) )
@@ -634,7 +634,7 @@ pub fn miri_to_const<'tcx>(tcx: TyCtxt<'tcx>, result: mir::ConstantKind<'tcx>) -
634634 . map ( Constant :: Vec ) ,
635635 _ => None ,
636636 } ,
637- ty:: Float ( FloatTy :: F64 ) => match len. try_eval_usize ( tcx , ty :: ParamEnv :: empty ( ) ) {
637+ ty:: Float ( FloatTy :: F64 ) => match len. to_valtree ( ) . try_to_machine_usize ( tcx ) {
638638 Some ( len) => alloc
639639 . inner ( )
640640 . inspect_with_uninit_and_ptr_outside_interpreter ( 0 ..( 8 * len as usize ) )
You can’t perform that action at this time.
0 commit comments