From aeea9c67fff738f3bf2f27cbe099c5928dff0927 Mon Sep 17 00:00:00 2001 From: Jonathan Schwender Date: Thu, 22 Jun 2023 10:23:24 +0800 Subject: [PATCH] Fix swapping of `>>=` and `<<=` in constants This should't change behavior in practice since using these in constants doesn't seem possible. Closes #850 --- CHANGES | 4 ++++ src/bindgen/ir/constant.rs | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index c68796a75..2cbf62984 100644 --- a/CHANGES +++ b/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 diff --git a/src/bindgen/ir/constant.rs b/src/bindgen/ir/constant.rs index 42182ab92..d3b9bd443 100644 --- a/src/bindgen/ir/constant.rs +++ b/src/bindgen/ir/constant.rs @@ -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),