Skip to content

Commit 554f7f8

Browse files
committed
Auto merge of #12974 - fprasx:master, r=lnicola
Corrected order of printing op and `=` Fixes #12971 where `Display` impl for assignment operators does `=+` instead of `+=`
2 parents 79c22d5 + e39918f commit 554f7f8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/syntax/src/ast/operators.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,10 @@ impl fmt::Display for BinaryOp {
111111
BinaryOp::ArithOp(op) => fmt::Display::fmt(op, f),
112112
BinaryOp::CmpOp(op) => fmt::Display::fmt(op, f),
113113
BinaryOp::Assignment { op } => {
114-
f.write_str("=")?;
115114
if let Some(op) = op {
116115
fmt::Display::fmt(op, f)?;
117116
}
117+
f.write_str("=")?;
118118
Ok(())
119119
}
120120
}

0 commit comments

Comments
 (0)