@@ -60,7 +60,7 @@ macro_rules! try_validation {
60
60
Ok ( x) => x,
61
61
Err ( _) => throw_validation_failure!( $what, $where) ,
62
62
}
63
- } }
63
+ } } ;
64
64
}
65
65
66
66
/// We want to show a nice path to the invalid field for diagnostics,
@@ -428,7 +428,7 @@ impl<'rt, 'mir, 'tcx, M: Machine<'mir, 'tcx>> ValueVisitor<'mir, 'tcx, M>
428
428
err_unsup ! ( InvalidNullPointerUsage ) =>
429
429
throw_validation_failure ! ( "NULL reference" , self . path) ,
430
430
err_unsup ! ( AlignmentCheckFailed { required, has } ) =>
431
- throw_validation_failure ! ( format !( "unaligned reference \
431
+ throw_validation_failure ! ( format_args !( "unaligned reference \
432
432
(required {} byte alignment but found {})",
433
433
required. bytes( ) , has. bytes( ) ) , self . path) ,
434
434
err_unsup ! ( ReadBytesAsPointer ) =>
@@ -519,7 +519,7 @@ impl<'rt, 'mir, 'tcx, M: Machine<'mir, 'tcx>> ValueVisitor<'mir, 'tcx, M>
519
519
let value = try_validation ! ( value. not_undef( ) ,
520
520
value,
521
521
self . path,
522
- format !(
522
+ format_args !(
523
523
"something {}" ,
524
524
wrapping_range_format( & layout. valid_range, max_hi) ,
525
525
)
@@ -532,7 +532,7 @@ impl<'rt, 'mir, 'tcx, M: Machine<'mir, 'tcx>> ValueVisitor<'mir, 'tcx, M>
532
532
throw_validation_failure ! (
533
533
"a potentially NULL pointer" ,
534
534
self . path,
535
- format !(
535
+ format_args !(
536
536
"something that cannot possibly fail to be {}" ,
537
537
wrapping_range_format( & layout. valid_range, max_hi)
538
538
)
@@ -545,7 +545,7 @@ impl<'rt, 'mir, 'tcx, M: Machine<'mir, 'tcx>> ValueVisitor<'mir, 'tcx, M>
545
545
throw_validation_failure ! (
546
546
"a pointer" ,
547
547
self . path,
548
- format !(
548
+ format_args !(
549
549
"something that cannot possibly fail to be {}" ,
550
550
wrapping_range_format( & layout. valid_range, max_hi)
551
551
)
@@ -562,7 +562,7 @@ impl<'rt, 'mir, 'tcx, M: Machine<'mir, 'tcx>> ValueVisitor<'mir, 'tcx, M>
562
562
throw_validation_failure ! (
563
563
bits,
564
564
self . path,
565
- format !( "something {}" , wrapping_range_format( & layout. valid_range, max_hi) )
565
+ format_args !( "something {}" , wrapping_range_format( & layout. valid_range, max_hi) )
566
566
)
567
567
}
568
568
}
0 commit comments