Auto merge of #12974 - fprasx:master, r=lnicola
Corrected order of printing op and `=` Fixes https://github.com/rust-lang/rust-analyzer/issues/12971 where `Display` impl for assignment operators does `=+` instead of `+=`
This commit is contained in:
commit
554f7f889e
@ -111,10 +111,10 @@ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
BinaryOp::ArithOp(op) => fmt::Display::fmt(op, f),
|
||||
BinaryOp::CmpOp(op) => fmt::Display::fmt(op, f),
|
||||
BinaryOp::Assignment { op } => {
|
||||
f.write_str("=")?;
|
||||
if let Some(op) = op {
|
||||
fmt::Display::fmt(op, f)?;
|
||||
}
|
||||
f.write_str("=")?;
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user