Skip to content

Commit 387ea61

Browse files
committed
rustc: make ppaux' print macro use only one closure.
1 parent 27ddf2c commit 387ea61

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/librustc/util/ppaux.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,8 +252,11 @@ macro_rules! print_inner {
252252
};
253253
}
254254
macro_rules! print {
255-
( $cx:expr $(, $kind:ident $data:tt)+ ) => {
256-
Ok(())$(.and_then(|_| print_inner!($cx, $kind $data)))+
255+
( $cx:expr, $($kind:ident $data:tt),+ ) => {
256+
(|| -> fmt::Result {
257+
$(print_inner!($cx, $kind $data)?;)+
258+
Ok(())
259+
})()
257260
};
258261
}
259262

0 commit comments

Comments
 (0)