@@ -183,18 +183,17 @@ impl<'a, 'mir, 'tcx, M: Machine<'a, 'mir, 'tcx>> EvalContext<'a, 'mir, 'tcx, M>
183183 } else if Some ( def_id) == self . tcx . lang_items ( ) . panic_fn ( ) {
184184 assert ! ( args. len( ) == 1 ) ;
185185 // &(&'static str, &'static str, u32, u32)
186- let ptr = self . read_immediate ( args[ 0 ] ) ?;
187- let place = self . ref_to_mplace ( ptr) ?;
186+ let place = self . deref_operand ( args[ 0 ] ) ?;
188187 let ( msg, file, line, col) = (
189188 self . mplace_field ( place, 0 ) ?,
190189 self . mplace_field ( place, 1 ) ?,
191190 self . mplace_field ( place, 2 ) ?,
192191 self . mplace_field ( place, 3 ) ?,
193192 ) ;
194193
195- let msg_place = self . ref_to_mplace ( self . read_immediate ( msg. into ( ) ) ? ) ?;
194+ let msg_place = self . deref_operand ( msg. into ( ) ) ?;
196195 let msg = Symbol :: intern ( self . read_str ( msg_place) ?) ;
197- let file_place = self . ref_to_mplace ( self . read_immediate ( file. into ( ) ) ? ) ?;
196+ let file_place = self . deref_operand ( file. into ( ) ) ?;
198197 let file = Symbol :: intern ( self . read_str ( file_place) ?) ;
199198 let line = self . read_scalar ( line. into ( ) ) ?. to_u32 ( ) ?;
200199 let col = self . read_scalar ( col. into ( ) ) ?. to_u32 ( ) ?;
@@ -203,17 +202,16 @@ impl<'a, 'mir, 'tcx, M: Machine<'a, 'mir, 'tcx>> EvalContext<'a, 'mir, 'tcx, M>
203202 assert ! ( args. len( ) == 2 ) ;
204203 // &'static str, &(&'static str, u32, u32)
205204 let msg = args[ 0 ] ;
206- let ptr = self . read_immediate ( args[ 1 ] ) ?;
207- let place = self . ref_to_mplace ( ptr) ?;
205+ let place = self . deref_operand ( args[ 1 ] ) ?;
208206 let ( file, line, col) = (
209207 self . mplace_field ( place, 0 ) ?,
210208 self . mplace_field ( place, 1 ) ?,
211209 self . mplace_field ( place, 2 ) ?,
212210 ) ;
213211
214- let msg_place = self . ref_to_mplace ( self . read_immediate ( msg. into ( ) ) ? ) ?;
212+ let msg_place = self . deref_operand ( msg. into ( ) ) ?;
215213 let msg = Symbol :: intern ( self . read_str ( msg_place) ?) ;
216- let file_place = self . ref_to_mplace ( self . read_immediate ( file. into ( ) ) ? ) ?;
214+ let file_place = self . deref_operand ( file. into ( ) ) ?;
217215 let file = Symbol :: intern ( self . read_str ( file_place) ?) ;
218216 let line = self . read_scalar ( line. into ( ) ) ?. to_u32 ( ) ?;
219217 let col = self . read_scalar ( col. into ( ) ) ?. to_u32 ( ) ?;
0 commit comments