@@ -49,7 +49,7 @@ macro_rules! try_validation {
49
49
/// as a kind of validation blacklist:
50
50
///
51
51
/// ```rust
52
- /// let v = try_validation_pat(some_fn(), Foo | Bar | Baz, "some failure", path);
52
+ /// let v = try_validation_pat! (some_fn(), Foo | Bar | Baz, "some failure", path);
53
53
/// // Failures that match $p are thrown up as validation errors, but other errors are passed back
54
54
/// // unchanged.
55
55
/// ```
@@ -59,7 +59,7 @@ macro_rules! try_validation_pat {
59
59
Ok ( x) => x,
60
60
// We catch the error and turn it into a validation failure. We are okay with
61
61
// allocation here as this can only slow down builds that fail anyway.
62
- $( Err ( $p ) ) |* if true => throw_validation_failure!( $what, $where $( , $details) ?) ,
62
+ $( Err ( InterpErrorInfo { kind : $p , .. } ) ) |* if true => throw_validation_failure!( $what, $where $( , $details) ?) ,
63
63
Err ( e) => Err :: <!, _>( e) ?,
64
64
}
65
65
} } ;
@@ -494,7 +494,7 @@ impl<'rt, 'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> ValidityVisitor<'rt, 'mir, '
494
494
// that lets us re-use `ref_to_mplace`).
495
495
let place = try_validation_pat ! (
496
496
self . ecx. ref_to_mplace( self . ecx. read_immediate( value) ?) ,
497
- InterpErrorInfo { kind : err_ub!( InvalidUndefBytes ( ..) ) , .. } ,
497
+ err_ub!( InvalidUndefBytes ( ..) ) ,
498
498
"uninitialized raw pointer" ,
499
499
self . path
500
500
) ;
0 commit comments