Skip to content

Commit 6a51de0

Browse files
committed
Casts are a type of binop
This just adds paren following the same cases as before
1 parent c0c6af7 commit 6a51de0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libsyntax/print/pprust.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1753,7 +1753,7 @@ impl<'a> State<'a> {
17531753
try!(self.print_literal(&**lit));
17541754
}
17551755
ast::ExprCast(ref expr, ref ty) => {
1756-
try!(self.print_expr(&**expr));
1756+
try!(self.print_expr_maybe_paren(&**expr));
17571757
try!(space(&mut self.s));
17581758
try!(self.word_space("as"));
17591759
try!(self.print_type(&**ty));

0 commit comments

Comments
 (0)