diff options
| author | jumbatm <jumbatm@gmail.com> | 2020-04-30 09:54:26 +1000 |
|---|---|---|
| committer | jumbatm <jumbatm@gmail.com> | 2020-05-01 21:52:43 +1000 |
| commit | 9c898d65b8e83adf56576616d120d33945a28409 (patch) | |
| tree | d04c0bbf7db67738dcefa21b47e28dd97e9cf74a /src | |
| parent | eca147896f2582d1dc7735fd238956082ea92280 (diff) | |
| download | rust-9c898d65b8e83adf56576616d120d33945a28409.tar.gz rust-9c898d65b8e83adf56576616d120d33945a28409.zip | |
Allow unreachable_patterns instead of using `if true`
Diffstat (limited to 'src')
| -rw-r--r-- | src/librustc_mir/interpret/validity.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/librustc_mir/interpret/validity.rs b/src/librustc_mir/interpret/validity.rs index d6f73fa2d02..262a01eab3c 100644 --- a/src/librustc_mir/interpret/validity.rs +++ b/src/librustc_mir/interpret/validity.rs @@ -59,7 +59,8 @@ macro_rules! try_validation_pat { Ok(x) => x, // We catch the error and turn it into a validation failure. We are okay with // allocation here as this can only slow down builds that fail anyway. - $( Err(InterpErrorInfo { kind: $p, .. }) )|* if true => throw_validation_failure!($what, $where $(, $details)?), + $( Err(InterpErrorInfo { kind: $p, .. }) )|* => throw_validation_failure!($what, $where $(, $details)?), + #[allow(unreachable_patterns)] Err(e) => Err::<!, _>(e)?, } }}; |
