Skip to content

Commit 8304739

Browse files
committed
Manually format macro to not go over text width.
1 parent 8175c4c commit 8304739

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/librustc_mir/interpret/validity.rs

+8-2
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,18 @@ 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 )|+ =>
71+
{ $( $what_fmt:expr ),+ } $( expected { $( $expected_fmt:expr ),+ } )? $( , )?}) => {{
7172
match $e {
7273
Ok(x) => x,
7374
// We catch the error and turn it into a validation failure. We are okay with
7475
// 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 ),+))?),
76+
$( Err(InterpErrorInfo { kind: $p, .. }) )|+ =>
77+
throw_validation_failure!(
78+
format_args!($( $what_fmt ),+),
79+
$where
80+
$(, format_args!($( $expected_fmt ),+))?
81+
),
7682
#[allow(unreachable_patterns)]
7783
Err(e) => Err::<!, _>(e)?,
7884
}

0 commit comments

Comments
 (0)