@@ -8,6 +8,7 @@ use std::task::Poll;
88use std:: thread;
99
1010use log:: info;
11+ use rustc_middle:: ty:: Ty ;
1112
1213use crate :: borrow_tracker:: RetagFields ;
1314use crate :: diagnostics:: report_leaks;
@@ -304,7 +305,7 @@ pub fn create_ecx<'mir, 'tcx: 'mir>(
304305 for arg in config. args . iter ( ) {
305306 // Make space for `0` terminator.
306307 let size = u64:: try_from ( arg. len ( ) ) . unwrap ( ) . checked_add ( 1 ) . unwrap ( ) ;
307- let arg_type = tcx . mk_array ( tcx. types . u8 , size) ;
308+ let arg_type = Ty :: new_array ( tcx , tcx. types . u8 , size) ;
308309 let arg_place =
309310 ecx. allocate ( ecx. layout_of ( arg_type) ?, MiriMemoryKind :: Machine . into ( ) ) ?;
310311 ecx. write_os_str_to_c_str ( OsStr :: new ( arg) , arg_place. ptr , size) ?;
@@ -313,7 +314,7 @@ pub fn create_ecx<'mir, 'tcx: 'mir>(
313314 }
314315 // Make an array with all these pointers, in the Miri memory.
315316 let argvs_layout = ecx. layout_of (
316- tcx . mk_array ( tcx. mk_imm_ptr ( tcx. types . u8 ) , u64:: try_from ( argvs. len ( ) ) . unwrap ( ) ) ,
317+ Ty :: new_array ( tcx, Ty :: new_imm_ptr ( tcx , tcx. types . u8 ) , u64:: try_from ( argvs. len ( ) ) . unwrap ( ) ) ,
317318 ) ?;
318319 let argvs_place = ecx. allocate ( argvs_layout, MiriMemoryKind :: Machine . into ( ) ) ?;
319320 for ( idx, arg) in argvs. into_iter ( ) . enumerate ( ) {
@@ -332,7 +333,7 @@ pub fn create_ecx<'mir, 'tcx: 'mir>(
332333 ecx. machine . argc = Some ( * argc_place) ;
333334
334335 let argv_place = ecx. allocate (
335- ecx. layout_of ( tcx . mk_imm_ptr ( tcx. types . unit ) ) ?,
336+ ecx. layout_of ( Ty :: new_imm_ptr ( tcx , tcx. types . unit ) ) ?,
336337 MiriMemoryKind :: Machine . into ( ) ,
337338 ) ?;
338339 ecx. write_immediate ( argv, & argv_place. into ( ) ) ?;
@@ -344,7 +345,7 @@ pub fn create_ecx<'mir, 'tcx: 'mir>(
344345 // Construct a command string with all the arguments.
345346 let cmd_utf16: Vec < u16 > = args_to_utf16_command_string ( config. args . iter ( ) ) ;
346347
347- let cmd_type = tcx . mk_array ( tcx. types . u16 , u64:: try_from ( cmd_utf16. len ( ) ) . unwrap ( ) ) ;
348+ let cmd_type = Ty :: new_array ( tcx , tcx. types . u16 , u64:: try_from ( cmd_utf16. len ( ) ) . unwrap ( ) ) ;
348349 let cmd_place =
349350 ecx. allocate ( ecx. layout_of ( cmd_type) ?, MiriMemoryKind :: Machine . into ( ) ) ?;
350351 ecx. machine . cmd_line = Some ( * cmd_place) ;
0 commit comments