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>) -
619
619
} ,
620
620
mir:: ConstantKind :: Val ( ConstValue :: ByRef { alloc, offset : _ } , _) => match result. ty ( ) . kind ( ) {
621
621
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 ) {
623
623
Some ( len) => alloc
624
624
. inner ( )
625
625
. 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>) -
634
634
. map ( Constant :: Vec ) ,
635
635
_ => None ,
636
636
} ,
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 ) {
638
638
Some ( len) => alloc
639
639
. inner ( )
640
640
. inspect_with_uninit_and_ptr_outside_interpreter ( 0 ..( 8 * len as usize ) )
You can’t perform that action at this time.
0 commit comments