Fix swapping of >>= and <<= in constants

This should't change behavior in practice since using these in constants
doesn't seem possible.

Closes #850
This commit is contained in:
Jonathan Schwender
2023-06-22 10:23:24 +08:00
committed by Emilio Cobos Álvarez
parent dd9a550152
commit aeea9c67ff
2 changed files with 6 additions and 2 deletions
+4
View File
@@ -1,3 +1,7 @@
# Unreleased
* Fix swapping of `>>=` and `<<=` in constants.
## 0.25.0
* Re-release of yanked 0.24.6 as a major release
+2 -2
View File
@@ -321,8 +321,8 @@ impl Literal {
syn::BinOp::BitXorEq(..) => "^=",
syn::BinOp::BitAndEq(..) => "&=",
syn::BinOp::BitOrEq(..) => "|=",
syn::BinOp::ShlEq(..) => ">>=",
syn::BinOp::ShrEq(..) => "<<=",
syn::BinOp::ShlEq(..) => "<<=",
syn::BinOp::ShrEq(..) => ">>=",
};
Ok(Literal::BinOp {
left: Box::new(l),