@@ -148,9 +148,6 @@ impl<'a, 'mir, 'tcx, M: Machine<'a, 'mir, 'tcx>> EvalContext<'a, 'mir, 'tcx, M>
148
148
ref_tracking : Option < & mut RefTracking < ' tcx > > ,
149
149
const_mode : bool ,
150
150
) -> EvalResult < ' tcx > {
151
- trace ! ( "validate scalar by type: {:#?}, {:#?}, {}" ,
152
- * value, value. layout. size, value. layout. ty) ;
153
-
154
151
// Go over all the primitive types
155
152
let ty = value. layout . ty ;
156
153
match ty. sty {
@@ -225,7 +222,7 @@ impl<'a, 'mir, 'tcx, M: Machine<'a, 'mir, 'tcx>> EvalContext<'a, 'mir, 'tcx, M>
225
222
}
226
223
}
227
224
// non-ZST also have to be dereferencable
228
- if !place . layout . is_zst ( ) {
225
+ if size != Size :: ZERO {
229
226
let ptr = try_validation ! ( place. ptr. to_ptr( ) ,
230
227
"integer pointer in non-ZST reference" , path) ;
231
228
if const_mode {
@@ -280,7 +277,6 @@ impl<'a, 'mir, 'tcx, M: Machine<'a, 'mir, 'tcx>> EvalContext<'a, 'mir, 'tcx, M>
280
277
path : & Vec < PathElem > ,
281
278
layout : & layout:: Scalar ,
282
279
) -> EvalResult < ' tcx > {
283
- trace ! ( "validate scalar by layout: {:#?}, {:#?}, {:#?}" , value, size, layout) ;
284
280
let ( lo, hi) = layout. valid_range . clone ( ) . into_inner ( ) ;
285
281
let max_hi = u128:: max_value ( ) >> ( 128 - size. bits ( ) ) ; // as big as the size fits
286
282
assert ! ( hi <= max_hi) ;
@@ -372,7 +368,7 @@ impl<'a, 'mir, 'tcx, M: Machine<'a, 'mir, 'tcx>> EvalContext<'a, 'mir, 'tcx, M>
372
368
mut ref_tracking : Option < & mut RefTracking < ' tcx > > ,
373
369
const_mode : bool ,
374
370
) -> EvalResult < ' tcx > {
375
- trace ! ( "validate_operand: {:?}, {:# ?}" , * dest, dest. layout) ;
371
+ trace ! ( "validate_operand: {:?}, {:?}" , * dest, dest. layout. ty ) ;
376
372
377
373
// If this is a multi-variant layout, we have find the right one and proceed with that.
378
374
// (No good reasoning to make this recursion, but it is equivalent to that.)
0 commit comments