Skip to content

Commit 8175c4c

Browse files
committed
Expect at least one expr for p, what_fmt and expected_fmt.
1 parent f1d778f commit 8175c4c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/librustc_mir/interpret/validity.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,12 @@ macro_rules! try_validation {
6767
/// ```
6868
///
6969
macro_rules! try_validation_pat {
70-
($e:expr, $where:expr, { $( $p:pat )|* => { $( $what_fmt:expr ),* } $( expected { $( $expected_fmt:expr ),* } )? $( , )?}) => {{
70+
($e:expr, $where:expr, { $( $p:pat )|+ => { $( $what_fmt:expr ),+ } $( expected { $( $expected_fmt:expr ),+ } )? $( , )?}) => {{
7171
match $e {
7272
Ok(x) => x,
7373
// We catch the error and turn it into a validation failure. We are okay with
7474
// allocation here as this can only slow down builds that fail anyway.
75-
$( Err(InterpErrorInfo { kind: $p, .. }) )|* => throw_validation_failure!(format_args!($( $what_fmt ),*), $where $(, format_args!($( $expected_fmt ),*))?),
75+
$( Err(InterpErrorInfo { kind: $p, .. }) )|+ => throw_validation_failure!(format_args!($( $what_fmt ),+), $where $(, format_args!($( $expected_fmt ),+))?),
7676
#[allow(unreachable_patterns)]
7777
Err(e) => Err::<!, _>(e)?,
7878
}

0 commit comments

Comments
 (0)