diff options
| author | Eduard-Mihai Burtescu <edy.burt@gmail.com> | 2019-01-09 12:13:39 +0200 |
|---|---|---|
| committer | Eduard-Mihai Burtescu <edy.burt@gmail.com> | 2019-03-15 13:25:10 +0200 |
| commit | 387ea61ec146722daa9fcf5f2658ea5ee2211f0c (patch) | |
| tree | 20075a9d0a740ce44e7b198ac68d5ceefe1c81ff | |
| parent | 27ddf2cec8126fbf1a272cee6ce6cb1c18b97e2a (diff) | |
| download | rust-387ea61ec146722daa9fcf5f2658ea5ee2211f0c.tar.gz rust-387ea61ec146722daa9fcf5f2658ea5ee2211f0c.zip | |
rustc: make ppaux' print macro use only one closure.
| -rw-r--r-- | src/librustc/util/ppaux.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/librustc/util/ppaux.rs b/src/librustc/util/ppaux.rs index 6384a2af8ef..a381f8f4e8a 100644 --- a/src/librustc/util/ppaux.rs +++ b/src/librustc/util/ppaux.rs @@ -252,8 +252,11 @@ macro_rules! print_inner { }; } macro_rules! print { - ( $cx:expr $(, $kind:ident $data:tt)+ ) => { - Ok(())$(.and_then(|_| print_inner!($cx, $kind $data)))+ + ( $cx:expr, $($kind:ident $data:tt),+ ) => { + (|| -> fmt::Result { + $(print_inner!($cx, $kind $data)?;)+ + Ok(()) + })() }; } |
