Skip to content

Commit

Permalink
Fix swapping of >>= and <<= in constants
Browse files Browse the repository at this point in the history
This should't change behavior in practice since using these in constants
doesn't seem possible.

Closes #850
  • Loading branch information
jschwe authored and emilio committed Aug 25, 2023
1 parent dd9a550 commit aeea9c6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGES
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/bindgen/ir/constant.rs
Expand Up @@ -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),
Expand Down

0 comments on commit aeea9c6

Please sign in to comment.