rustc: make ppaux' print macro use only one closure.

This commit is contained in:
Eduard-Mihai Burtescu 2019-01-09 12:13:39 +02:00
parent 27ddf2cec8
commit 387ea61ec1

View File

@ -252,8 +252,11 @@ macro_rules! print_inner {
}; };
} }
macro_rules! print { macro_rules! print {
( $cx:expr $(, $kind:ident $data:tt)+ ) => { ( $cx:expr, $($kind:ident $data:tt),+ ) => {
Ok(())$(.and_then(|_| print_inner!($cx, $kind $data)))+ (|| -> fmt::Result {
$(print_inner!($cx, $kind $data)?;)+
Ok(())
})()
}; };
} }