@@ -60,7 +60,7 @@ macro_rules! try_validation {
6060 Ok ( x) => x,
6161 Err ( _) => throw_validation_failure!( $what, $where) ,
6262 }
63- } }
63+ } } ;
6464}
6565
6666/// 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>
428428 err_unsup ! ( InvalidNullPointerUsage ) =>
429429 throw_validation_failure ! ( "NULL reference" , self . path) ,
430430 err_unsup ! ( AlignmentCheckFailed { required, has } ) =>
431- throw_validation_failure ! ( format !( "unaligned reference \
431+ throw_validation_failure ! ( format_args !( "unaligned reference \
432432 (required {} byte alignment but found {})",
433433 required. bytes( ) , has. bytes( ) ) , self . path) ,
434434 err_unsup ! ( ReadBytesAsPointer ) =>
@@ -519,7 +519,7 @@ impl<'rt, 'mir, 'tcx, M: Machine<'mir, 'tcx>> ValueVisitor<'mir, 'tcx, M>
519519 let value = try_validation ! ( value. not_undef( ) ,
520520 value,
521521 self . path,
522- format !(
522+ format_args !(
523523 "something {}" ,
524524 wrapping_range_format( & layout. valid_range, max_hi) ,
525525 )
@@ -532,7 +532,7 @@ impl<'rt, 'mir, 'tcx, M: Machine<'mir, 'tcx>> ValueVisitor<'mir, 'tcx, M>
532532 throw_validation_failure ! (
533533 "a potentially NULL pointer" ,
534534 self . path,
535- format !(
535+ format_args !(
536536 "something that cannot possibly fail to be {}" ,
537537 wrapping_range_format( & layout. valid_range, max_hi)
538538 )
@@ -545,7 +545,7 @@ impl<'rt, 'mir, 'tcx, M: Machine<'mir, 'tcx>> ValueVisitor<'mir, 'tcx, M>
545545 throw_validation_failure ! (
546546 "a pointer" ,
547547 self . path,
548- format !(
548+ format_args !(
549549 "something that cannot possibly fail to be {}" ,
550550 wrapping_range_format( & layout. valid_range, max_hi)
551551 )
@@ -562,7 +562,7 @@ impl<'rt, 'mir, 'tcx, M: Machine<'mir, 'tcx>> ValueVisitor<'mir, 'tcx, M>
562562 throw_validation_failure ! (
563563 bits,
564564 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) )
566566 )
567567 }
568568 }
0 commit comments