@@ -105,7 +105,7 @@ pub fn create_ecx<'mir, 'tcx: 'mir>(
105
105
{
106
106
let argc_place = ecx. allocate ( dest. layout , MiriMemoryKind :: Env . into ( ) ) ;
107
107
ecx. write_scalar ( argc, argc_place. into ( ) ) ?;
108
- ecx. machine . argc = Some ( argc_place. ptr . to_ptr ( ) ? ) ;
108
+ ecx. machine . argc = Some ( argc_place. ptr ) ;
109
109
}
110
110
111
111
// Third argument (`argv`): created from `config.args`.
@@ -149,14 +149,14 @@ pub fn create_ecx<'mir, 'tcx: 'mir>(
149
149
{
150
150
let argv_place = ecx. allocate ( dest. layout , MiriMemoryKind :: Env . into ( ) ) ;
151
151
ecx. write_scalar ( argv, argv_place. into ( ) ) ?;
152
- ecx. machine . argv = Some ( argv_place. ptr . to_ptr ( ) ? ) ;
152
+ ecx. machine . argv = Some ( argv_place. ptr ) ;
153
153
}
154
154
// Store command line as UTF-16 for Windows `GetCommandLineW`.
155
155
{
156
156
let cmd_utf16: Vec < u16 > = cmd. encode_utf16 ( ) . collect ( ) ;
157
157
let cmd_type = tcx. mk_array ( tcx. types . u16 , cmd_utf16. len ( ) as u64 ) ;
158
158
let cmd_place = ecx. allocate ( ecx. layout_of ( cmd_type) ?, MiriMemoryKind :: Env . into ( ) ) ;
159
- ecx. machine . cmd_line = Some ( cmd_place. ptr . to_ptr ( ) ? ) ;
159
+ ecx. machine . cmd_line = Some ( cmd_place. ptr ) ;
160
160
// Store the UTF-16 string. We just allocated so we know the bounds are fine.
161
161
let char_size = Size :: from_bytes ( 2 ) ;
162
162
for ( idx, & c) in cmd_utf16. iter ( ) . enumerate ( ) {
0 commit comments