about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorTim Chevalier <chevalier@alum.wellesley.edu>2012-08-23 16:58:43 -0700
committerTim Chevalier <chevalier@alum.wellesley.edu>2012-08-23 16:59:05 -0700
commit80d129aa45e897b569e7f4aed29b272860e639ad (patch)
tree15ff28a4c15d1c605f8aedd8669c672eee49772b /src/libsyntax
parent5eea7d6e618ff1f4a26ab79b2fb53208b0ce7912 (diff)
Parenthesize unary move exprs in prettyprinter
Closes #3220
Diffstat (limited to 'src/libsyntax')
-rw-r--r--src/libsyntax/print/pprust.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/libsyntax/print/pprust.rs b/src/libsyntax/print/pprust.rs
index bcd22163342..ca958acb10b 100644
--- a/src/libsyntax/print/pprust.rs
+++ b/src/libsyntax/print/pprust.rs
@@ -1234,7 +1234,12 @@ fn print_expr(s: ps, &&expr: @ast::expr) {
         print_block(s, blk);
       }
       ast::expr_copy(e) => { word_space(s, ~"copy"); print_expr(s, e); }
-      ast::expr_unary_move(e) => { word_space(s, ~"move"); print_expr(s, e); }
+      ast::expr_unary_move(e) => {
+          popen(s);
+          word_space(s, ~"move");
+          print_expr(s, e);
+          pclose(s);
+      }
       ast::expr_move(lhs, rhs) => {
         print_expr(s, lhs);
         space(s.s);