Skip to content

Commit 0bb5a1a

Browse files
committed
Tidy test case
1 parent 8602a7d commit 0bb5a1a

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/test/run-pass/type-macros.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,11 @@ impl<Rec: HList + Sized, X, Xs: HList, Ys: HList> Add<Ys> for Cons<X, Xs> where
5757
// type macro Expr allows us to expand the + operator appropriately
5858
macro_rules! Expr {
5959
{ ( $($LHS:tt)+ ) } => { Expr!($($LHS)+) };
60-
{ HList ! [ $($LHS:tt)* ] + $($RHS:tt)+ } => { <Expr!(HList![$($LHS)*]) as Add<Expr!($($RHS)+)>>::Output };
61-
{ $LHS:tt + $($RHS:tt)+ } => { <Expr!($LHS) as Add<Expr!($($RHS)+)>>::Output };
62-
{ $LHS:ty } => { $LHS };
60+
{ HList ! [ $($LHS:tt)* ] + $($RHS:tt)+ } => {
61+
<Expr!(HList![$($LHS)*]) as Add<Expr!($($RHS)+)>>::Output
62+
};
63+
{ $LHS:tt + $($RHS:tt)+ } => { <Expr!($LHS) as Add<Expr!($($RHS)+)>>::Output };
64+
{ $LHS:ty } => { $LHS };
6365
}
6466

6567
// test demonstrating term level `xs + ys` and type level `Expr!(Xs + Ys)`

0 commit comments

Comments
 (0)