@@ -476,7 +476,7 @@ impl<'rt, 'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> ValidityVisitor<'rt, 'mir, '
476
476
Some ( CtfeValidationMode :: Const { .. } ) => {
477
477
// We can't recursively validate `extern static`, so we better reject them.
478
478
if self . ecx . tcx . is_foreign_item ( did) {
479
- throw_validation_failure ! ( self . path, ConstRefToExtern ) ;
479
+ throw_validation_failure ! ( self . path, ConstRefToExtern )
480
480
}
481
481
}
482
482
None => { }
@@ -518,14 +518,14 @@ impl<'rt, 'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> ValidityVisitor<'rt, 'mir, '
518
518
if ptr_expected_mutbl == Mutability :: Mut
519
519
&& alloc_actual_mutbl == Mutability :: Not
520
520
{
521
- throw_validation_failure ! ( self . path, MutableRefToImmutable ) ;
521
+ throw_validation_failure ! ( self . path, MutableRefToImmutable )
522
522
}
523
523
// In a const, everything must be completely immutable.
524
524
if matches ! ( self . ctfe_mode, Some ( CtfeValidationMode :: Const { .. } ) ) {
525
525
if ptr_expected_mutbl == Mutability :: Mut
526
526
|| alloc_actual_mutbl == Mutability :: Mut
527
527
{
528
- throw_validation_failure ! ( self . path, ConstRefToMutable ) ;
528
+ throw_validation_failure ! ( self . path, ConstRefToMutable )
529
529
}
530
530
}
531
531
}
@@ -621,7 +621,7 @@ impl<'rt, 'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> ValidityVisitor<'rt, 'mir, '
621
621
} else {
622
622
// Otherwise (for standalone Miri), we have to still check it to be non-null.
623
623
if self . ecx . scalar_may_be_null ( value) ? {
624
- throw_validation_failure ! ( self . path, NullFnPtr ) ;
624
+ throw_validation_failure ! ( self . path, NullFnPtr )
625
625
}
626
626
}
627
627
Ok ( true )
@@ -786,7 +786,7 @@ impl<'rt, 'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> ValueVisitor<'mir, 'tcx, M>
786
786
if self . ctfe_mode . is_some_and ( |c| !c. allow_immutable_unsafe_cell ( ) ) {
787
787
if !op. layout . is_zst ( ) && !op. layout . ty . is_freeze ( * self . ecx . tcx , self . ecx . param_env ) {
788
788
if !self . in_mutable_memory ( op) {
789
- throw_validation_failure ! ( self . path, UnsafeCellInImmutable ) ;
789
+ throw_validation_failure ! ( self . path, UnsafeCellInImmutable )
790
790
}
791
791
}
792
792
}
@@ -819,7 +819,7 @@ impl<'rt, 'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> ValueVisitor<'mir, 'tcx, M>
819
819
&& def. is_unsafe_cell ( )
820
820
{
821
821
if !self . in_mutable_memory ( op) {
822
- throw_validation_failure ! ( self . path, UnsafeCellInImmutable ) ;
822
+ throw_validation_failure ! ( self . path, UnsafeCellInImmutable )
823
823
}
824
824
}
825
825
}
@@ -934,7 +934,7 @@ impl<'rt, 'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> ValueVisitor<'mir, 'tcx, M>
934
934
match op. layout . abi {
935
935
Abi :: Uninhabited => {
936
936
let ty = op. layout . ty ;
937
- throw_validation_failure ! ( self . path, UninhabitedVal { ty } ) ;
937
+ throw_validation_failure ! ( self . path, UninhabitedVal { ty } )
938
938
}
939
939
Abi :: Scalar ( scalar_layout) => {
940
940
if !scalar_layout. is_uninit_valid ( ) {
0 commit comments