From cc31bb0a9eebc99e51d5332039c6054e63baf774 Mon Sep 17 00:00:00 2001 From: klutzy Date: Thu, 17 Apr 2014 17:35:40 +0900 Subject: [PATCH] pprust: Fix asm output --- src/libsyntax/print/pprust.rs | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/src/libsyntax/print/pprust.rs b/src/libsyntax/print/pprust.rs index c8894c1f816..7e94fa47588 100644 --- a/src/libsyntax/print/pprust.rs +++ b/src/libsyntax/print/pprust.rs @@ -1516,22 +1516,27 @@ impl<'a> State<'a> { try!(self.popen()); try!(self.print_string(a.asm.get(), a.asm_str_style)); try!(self.word_space(":")); - for &(ref co, o) in a.outputs.iter() { - try!(self.print_string(co.get(), ast::CookedStr)); - try!(self.popen()); - try!(self.print_expr(o)); - try!(self.pclose()); - try!(self.word_space(",")); - } + + try!(self.commasep(Inconsistent, a.outputs.as_slice(), |s, &(ref co, o)| { + try!(s.print_string(co.get(), ast::CookedStr)); + try!(s.popen()); + try!(s.print_expr(o)); + try!(s.pclose()); + Ok(()) + })); + try!(space(&mut self.s)); try!(self.word_space(":")); - for &(ref co, o) in a.inputs.iter() { - try!(self.print_string(co.get(), ast::CookedStr)); - try!(self.popen()); - try!(self.print_expr(o)); - try!(self.pclose()); - try!(self.word_space(",")); - } + + try!(self.commasep(Inconsistent, a.inputs.as_slice(), |s, &(ref co, o)| { + try!(s.print_string(co.get(), ast::CookedStr)); + try!(s.popen()); + try!(s.print_expr(o)); + try!(s.pclose()); + Ok(()) + })); + try!(space(&mut self.s)); try!(self.word_space(":")); + try!(self.print_string(a.clobbers.get(), ast::CookedStr)); try!(self.pclose()); }