From 830473959adef21d6d9a9e13faadc0776b64e925 Mon Sep 17 00:00:00 2001 From: jumbatm Date: Fri, 1 May 2020 21:45:55 +1000 Subject: [PATCH] Manually format macro to not go over text width. --- src/librustc_mir/interpret/validity.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/librustc_mir/interpret/validity.rs b/src/librustc_mir/interpret/validity.rs index 3395c19400a..54da0ba9eed 100644 --- a/src/librustc_mir/interpret/validity.rs +++ b/src/librustc_mir/interpret/validity.rs @@ -67,12 +67,18 @@ macro_rules! try_validation { /// ``` /// macro_rules! try_validation_pat { - ($e:expr, $where:expr, { $( $p:pat )|+ => { $( $what_fmt:expr ),+ } $( expected { $( $expected_fmt:expr ),+ } )? $( , )?}) => {{ + ($e:expr, $where:expr, { $( $p:pat )|+ => + { $( $what_fmt:expr ),+ } $( expected { $( $expected_fmt:expr ),+ } )? $( , )?}) => {{ match $e { 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, .. }) )|+ => throw_validation_failure!(format_args!($( $what_fmt ),+), $where $(, format_args!($( $expected_fmt ),+))?), + $( Err(InterpErrorInfo { kind: $p, .. }) )|+ => + throw_validation_failure!( + format_args!($( $what_fmt ),+), + $where + $(, format_args!($( $expected_fmt ),+))? + ), #[allow(unreachable_patterns)] Err(e) => Err::(e)?, }