Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 9c898d6

Browse files
committed
Allow unreachable_patterns instead of using if true
1 parent eca1478 commit 9c898d6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/librustc_mir/interpret/validity.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ macro_rules! try_validation_pat {
5959
Ok(x) => x,
6060
// We catch the error and turn it into a validation failure. We are okay with
6161
// allocation here as this can only slow down builds that fail anyway.
62-
$( Err(InterpErrorInfo { kind: $p, .. }) )|* if true => throw_validation_failure!($what, $where $(, $details)?),
62+
$( Err(InterpErrorInfo { kind: $p, .. }) )|* => throw_validation_failure!($what, $where $(, $details)?),
63+
#[allow(unreachable_patterns)]
6364
Err(e) => Err::<!, _>(e)?,
6465
}
6566
}};

0 commit comments

Comments
 (0)