Repository: dtolnay/syn
Pull request #1366 (2023-02-06 03:26:37)

Rename binary assignment operators to match core::ops's traits


Patch:
diff --git a/src/expr.rs b/src/expr.rs
index 843d0305..d28e86e8 100644
--- a/src/expr.rs
+++ b/src/expr.rs
@@ -1023,16 +1023,16 @@ pub(crate) mod parsing {
                 | BinOp::Ne(_)
                 | BinOp::Ge(_)
                 | BinOp::Gt(_) => Precedence::Compare,
-                BinOp::AddEq(_)
-                | BinOp::SubEq(_)
-                | BinOp::MulEq(_)
-                | BinOp::DivEq(_)
-                | BinOp::RemEq(_)
-                | BinOp::BitXorEq(_)
-                | BinOp::BitAndEq(_)
-                | BinOp::BitOrEq(_)
-                | BinOp::ShlEq(_)
-                | BinOp::ShrEq(_) => Precedence::Assign,
+                BinOp::AddAssign(_)
+                | BinOp::SubAssign(_)
+                | BinOp::MulAssign(_)
+                | BinOp::DivAssign(_)
+                | BinOp::RemAssign(_)
+                | BinOp::BitXorAssign(_)
+                | BinOp::BitAndAssign(_)
+                | BinOp::BitOrAssign(_)
+                | BinOp::ShlAssign(_)
+                | BinOp::ShrAssign(_) => Precedence::Assign,
             }
         }
     }
diff --git a/src/gen/debug.rs b/src/gen/debug.rs
index 86a97fbe..6cf24f45 100644
--- a/src/gen/debug.rs
+++ b/src/gen/debug.rs
@@ -214,53 +214,53 @@ impl Debug for BinOp {
                 formatter.field(v0);
                 formatter.finish()
             }
-            BinOp::AddEq(v0) => {
-                let mut formatter = formatter.debug_tuple("AddEq");
+            BinOp::AddAssign(v0) => {
+                let mut formatter = formatter.debug_tuple("AddAssign");
                 formatter.field(v0);
                 formatter.finish()
             }
-            BinOp::SubEq(v0) => {
-                let mut formatter = formatter.debug_tuple("SubEq");
+            BinOp::SubAssign(v0) => {
+                let mut formatter = formatter.debug_tuple("SubAssign");
                 formatter.field(v0);
                 formatter.finish()
             }
-            BinOp::MulEq(v0) => {
-                let mut formatter = formatter.debug_tuple("MulEq");
+            BinOp::MulAssign(v0) => {
+                let mut formatter = formatter.debug_tuple("MulAssign");
                 formatter.field(v0);
                 formatter.finish()
             }
-            BinOp::DivEq(v0) => {
-                let mut formatter = formatter.debug_tuple("DivEq");
+            BinOp::DivAssign(v0) => {
+                let mut formatter = formatter.debug_tuple("DivAssign");
                 formatter.field(v0);
                 formatter.finish()
             }
-            BinOp::RemEq(v0) => {
-                let mut formatter = formatter.debug_tuple("RemEq");
+            BinOp::RemAssign(v0) => {
+                let mut formatter = formatter.debug_tuple("RemAssign");
                 formatter.field(v0);
                 formatter.finish()
             }
-            BinOp::BitXorEq(v0) => {
-                let mut formatter = formatter.debug_tuple("BitXorEq");
+            BinOp::BitXorAssign(v0) => {
+                let mut formatter = formatter.debug_tuple("BitXorAssign");
                 formatter.field(v0);
                 formatter.finish()
             }
-            BinOp::BitAndEq(v0) => {
-                let mut formatter = formatter.debug_tuple("BitAndEq");
+            BinOp::BitAndAssign(v0) => {
+                let mut formatter = formatter.debug_tuple("BitAndAssign");
                 formatter.field(v0);
                 formatter.finish()
             }
-            BinOp::BitOrEq(v0) => {
-                let mut formatter = formatter.debug_tuple("BitOrEq");
+            BinOp::BitOrAssign(v0) => {
+                let mut formatter = formatter.debug_tuple("BitOrAssign");
                 formatter.field(v0);
                 formatter.finish()
             }
-            BinOp::ShlEq(v0) => {
-                let mut formatter = formatter.debug_tuple("ShlEq");
+            BinOp::ShlAssign(v0) => {
+                let mut formatter = formatter.debug_tuple("ShlAssign");
                 formatter.field(v0);
                 formatter.finish()
             }
-            BinOp::ShrEq(v0) => {
-                let mut formatter = formatter.debug_tuple("ShrEq");
+            BinOp::ShrAssign(v0) => {
+                let mut formatter = formatter.debug_tuple("ShrAssign");
                 formatter.field(v0);
                 formatter.finish()
             }
diff --git a/src/gen/eq.rs b/src/gen/eq.rs
index 80f35613..da908f90 100644
--- a/src/gen/eq.rs
+++ b/src/gen/eq.rs
@@ -127,16 +127,16 @@ impl PartialEq for BinOp {
             (BinOp::Ne(_), BinOp::Ne(_)) => true,
             (BinOp::Ge(_), BinOp::Ge(_)) => true,
             (BinOp::Gt(_), BinOp::Gt(_)) => true,
-            (BinOp::AddEq(_), BinOp::AddEq(_)) => true,
-            (BinOp::SubEq(_), BinOp::SubEq(_)) => true,
-            (BinOp::MulEq(_), BinOp::MulEq(_)) => true,
-            (BinOp::DivEq(_), BinOp::DivEq(_)) => true,
-            (BinOp::RemEq(_), BinOp::RemEq(_)) => true,
-            (BinOp::BitXorEq(_), BinOp::BitXorEq(_)) => true,
-            (BinOp::BitAndEq(_), BinOp::BitAndEq(_)) => true,
-            (BinOp::BitOrEq(_), BinOp::BitOrEq(_)) => true,
-            (BinOp::ShlEq(_), BinOp::ShlEq(_)) => true,
-            (BinOp::ShrEq(_), BinOp::ShrEq(_)) => true,
+            (BinOp::AddAssign(_), BinOp::AddAssign(_)) => true,
+            (BinOp::SubAssign(_), BinOp::SubAssign(_)) => true,
+            (BinOp::MulAssign(_), BinOp::MulAssign(_)) => true,
+            (BinOp::DivAssign(_), BinOp::DivAssign(_)) => true,
+            (BinOp::RemAssign(_), BinOp::RemAssign(_)) => true,
+            (BinOp::BitXorAssign(_), BinOp::BitXorAssign(_)) => true,
+            (BinOp::BitAndAssign(_), BinOp::BitAndAssign(_)) => true,
+            (BinOp::BitOrAssign(_), BinOp::BitOrAssign(_)) => true,
+            (BinOp::ShlAssign(_), BinOp::ShlAssign(_)) => true,
+            (BinOp::ShrAssign(_), BinOp::ShrAssign(_)) => true,
             _ => false,
         }
     }
diff --git a/src/gen/fold.rs b/src/gen/fold.rs
index 0f365ff9..34c30b30 100644
--- a/src/gen/fold.rs
+++ b/src/gen/fold.rs
@@ -937,35 +937,35 @@ where
         BinOp::Gt(_binding_0) => {
             BinOp::Gt(Token![>](tokens_helper(f, &_binding_0.spans)))
         }
-        BinOp::AddEq(_binding_0) => {
-            BinOp::AddEq(Token![+=](tokens_helper(f, &_binding_0.spans)))
+        BinOp::AddAssign(_binding_0) => {
+            BinOp::AddAssign(Token![+=](tokens_helper(f, &_binding_0.spans)))
         }
-        BinOp::SubEq(_binding_0) => {
-            BinOp::SubEq(Token![-=](tokens_helper(f, &_binding_0.spans)))
+        BinOp::SubAssign(_binding_0) => {
+            BinOp::SubAssign(Token![-=](tokens_helper(f, &_binding_0.spans)))
         }
-        BinOp::MulEq(_binding_0) => {
-            BinOp::MulEq(Token![*=](tokens_helper(f, &_binding_0.spans)))
+        BinOp::MulAssign(_binding_0) => {
+            BinOp::MulAssign(Token![*=](tokens_helper(f, &_binding_0.spans)))
         }
-        BinOp::DivEq(_binding_0) => {
-            BinOp::DivEq(Token![/=](tokens_helper(f, &_binding_0.spans)))
+        BinOp::DivAssign(_binding_0) => {
+            BinOp::DivAssign(Token![/=](tokens_helper(f, &_binding_0.spans)))
         }
-        BinOp::RemEq(_binding_0) => {
-            BinOp::RemEq(Token![%=](tokens_helper(f, &_binding_0.spans)))
+        BinOp::RemAssign(_binding_0) => {
+            BinOp::RemAssign(Token![%=](tokens_helper(f, &_binding_0.spans)))
         }
-        BinOp::BitXorEq(_binding_0) => {
-            BinOp::BitXorEq(Token![^=](tokens_helper(f, &_binding_0.spans)))
+        BinOp::BitXorAssign(_binding_0) => {
+            BinOp::BitXorAssign(Token![^=](tokens_helper(f, &_binding_0.spans)))
         }
-        BinOp::BitAndEq(_binding_0) => {
-            BinOp::BitAndEq(Token![&=](tokens_helper(f, &_binding_0.spans)))
+        BinOp::BitAndAssign(_binding_0) => {
+            BinOp::BitAndAssign(Token![&=](tokens_helper(f, &_binding_0.spans)))
         }
-        BinOp::BitOrEq(_binding_0) => {
-            BinOp::BitOrEq(Token![|=](tokens_helper(f, &_binding_0.spans)))
+        BinOp::BitOrAssign(_binding_0) => {
+            BinOp::BitOrAssign(Token![|=](tokens_helper(f, &_binding_0.spans)))
         }
-        BinOp::ShlEq(_binding_0) => {
-            BinOp::ShlEq(Token![<<=](tokens_helper(f, &_binding_0.spans)))
+        BinOp::ShlAssign(_binding_0) => {
+            BinOp::ShlAssign(Token![<<=](tokens_helper(f, &_binding_0.spans)))
         }
-        BinOp::ShrEq(_binding_0) => {
-            BinOp::ShrEq(Token![>>=](tokens_helper(f, &_binding_0.spans)))
+        BinOp::ShrAssign(_binding_0) => {
+            BinOp::ShrAssign(Token![>>=](tokens_helper(f, &_binding_0.spans)))
         }
     }
 }
diff --git a/src/gen/hash.rs b/src/gen/hash.rs
index 8347a4a1..1ff4e212 100644
--- a/src/gen/hash.rs
+++ b/src/gen/hash.rs
@@ -178,34 +178,34 @@ impl Hash for BinOp {
             BinOp::Gt(_) => {
                 state.write_u8(17u8);
             }
-            BinOp::AddEq(_) => {
+            BinOp::AddAssign(_) => {
                 state.write_u8(18u8);
             }
-            BinOp::SubEq(_) => {
+            BinOp::SubAssign(_) => {
                 state.write_u8(19u8);
             }
-            BinOp::MulEq(_) => {
+            BinOp::MulAssign(_) => {
                 state.write_u8(20u8);
             }
-            BinOp::DivEq(_) => {
+            BinOp::DivAssign(_) => {
                 state.write_u8(21u8);
             }
-            BinOp::RemEq(_) => {
+            BinOp::RemAssign(_) => {
                 state.write_u8(22u8);
             }
-            BinOp::BitXorEq(_) => {
+            BinOp::BitXorAssign(_) => {
                 state.write_u8(23u8);
             }
-            BinOp::BitAndEq(_) => {
+            BinOp::BitAndAssign(_) => {
                 state.write_u8(24u8);
             }
-            BinOp::BitOrEq(_) => {
+            BinOp::BitOrAssign(_) => {
                 state.write_u8(25u8);
             }
-            BinOp::ShlEq(_) => {
+            BinOp::ShlAssign(_) => {
                 state.write_u8(26u8);
             }
-            BinOp::ShrEq(_) => {
+            BinOp::ShrAssign(_) => {
                 state.write_u8(27u8);
             }
         }
diff --git a/src/gen/visit.rs b/src/gen/visit.rs
index 0945db6e..14890834 100644
--- a/src/gen/visit.rs
+++ b/src/gen/visit.rs
@@ -940,34 +940,34 @@ where
         BinOp::Gt(_binding_0) => {
             tokens_helper(v, &_binding_0.spans);
         }
-        BinOp::AddEq(_binding_0) => {
+        BinOp::AddAssign(_binding_0) => {
             tokens_helper(v, &_binding_0.spans);
         }
-        BinOp::SubEq(_binding_0) => {
+        BinOp::SubAssign(_binding_0) => {
             tokens_helper(v, &_binding_0.spans);
         }
-        BinOp::MulEq(_binding_0) => {
+        BinOp::MulAssign(_binding_0) => {
             tokens_helper(v, &_binding_0.spans);
         }
-        BinOp::DivEq(_binding_0) => {
+        BinOp::DivAssign(_binding_0) => {
             tokens_helper(v, &_binding_0.spans);
         }
-        BinOp::RemEq(_binding_0) => {
+        BinOp::RemAssign(_binding_0) => {
             tokens_helper(v, &_binding_0.spans);
         }
-        BinOp::BitXorEq(_binding_0) => {
+        BinOp::BitXorAssign(_binding_0) => {
             tokens_helper(v, &_binding_0.spans);
         }
-        BinOp::BitAndEq(_binding_0) => {
+        BinOp::BitAndAssign(_binding_0) => {
             tokens_helper(v, &_binding_0.spans);
         }
-        BinOp::BitOrEq(_binding_0) => {
+        BinOp::BitOrAssign(_binding_0) => {
             tokens_helper(v, &_binding_0.spans);
         }
-        BinOp::ShlEq(_binding_0) => {
+        BinOp::ShlAssign(_binding_0) => {
             tokens_helper(v, &_binding_0.spans);
         }
-        BinOp::ShrEq(_binding_0) => {
+        BinOp::ShrAssign(_binding_0) => {
             tokens_helper(v, &_binding_0.spans);
         }
     }
diff --git a/src/gen/visit_mut.rs b/src/gen/visit_mut.rs
index b23ed75d..0a099516 100644
--- a/src/gen/visit_mut.rs
+++ b/src/gen/visit_mut.rs
@@ -941,34 +941,34 @@ where
         BinOp::Gt(_binding_0) => {
             tokens_helper(v, &mut _binding_0.spans);
         }
-        BinOp::AddEq(_binding_0) => {
+        BinOp::AddAssign(_binding_0) => {
             tokens_helper(v, &mut _binding_0.spans);
         }
-        BinOp::SubEq(_binding_0) => {
+        BinOp::SubAssign(_binding_0) => {
             tokens_helper(v, &mut _binding_0.spans);
         }
-        BinOp::MulEq(_binding_0) => {
+        BinOp::MulAssign(_binding_0) => {
             tokens_helper(v, &mut _binding_0.spans);
         }
-        BinOp::DivEq(_binding_0) => {
+        BinOp::DivAssign(_binding_0) => {
             tokens_helper(v, &mut _binding_0.spans);
         }
-        BinOp::RemEq(_binding_0) => {
+        BinOp::RemAssign(_binding_0) => {
             tokens_helper(v, &mut _binding_0.spans);
         }
-        BinOp::BitXorEq(_binding_0) => {
+        BinOp::BitXorAssign(_binding_0) => {
             tokens_helper(v, &mut _binding_0.spans);
         }
-        BinOp::BitAndEq(_binding_0) => {
+        BinOp::BitAndAssign(_binding_0) => {
             tokens_helper(v, &mut _binding_0.spans);
         }
-        BinOp::BitOrEq(_binding_0) => {
+        BinOp::BitOrAssign(_binding_0) => {
             tokens_helper(v, &mut _binding_0.spans);
         }
-        BinOp::ShlEq(_binding_0) => {
+        BinOp::ShlAssign(_binding_0) => {
             tokens_helper(v, &mut _binding_0.spans);
         }
-        BinOp::ShrEq(_binding_0) => {
+        BinOp::ShrAssign(_binding_0) => {
             tokens_helper(v, &mut _binding_0.spans);
         }
     }
diff --git a/src/op.rs b/src/op.rs
index 81894916..7b37c824 100644
--- a/src/op.rs
+++ b/src/op.rs
@@ -39,25 +39,25 @@ ast_enum! {
         /// The `>` operator (greater than)
         Gt(Token![>]),
         /// The `+=` operator
-        AddEq(Token![+=]),
+        AddAssign(Token![+=]),
         /// The `-=` operator
-        SubEq(Token![-=]),
+        SubAssign(Token![-=]),
         /// The `*=` operator
-        MulEq(Token![*=]),
+        MulAssign(Token![*=]),
         /// The `/=` operator
-        DivEq(Token![/=]),
+        DivAssign(Token![/=]),
         /// The `%=` operator
-        RemEq(Token![%=]),
+        RemAssign(Token![%=]),
         /// The `^=` operator
-        BitXorEq(Token![^=]),
+        BitXorAssign(Token![^=]),
         /// The `&=` operator
-        BitAndEq(Token![&=]),
+        BitAndAssign(Token![&=]),
         /// The `|=` operator
-        BitOrEq(Token![|=]),
+        BitOrAssign(Token![|=]),
         /// The `<<=` operator
-        ShlEq(Token![<<=]),
+        ShlAssign(Token![<<=]),
         /// The `>>=` operator
-        ShrEq(Token![>>=]),
+        ShrAssign(Token![>>=]),
     }
 }
 
@@ -131,25 +131,25 @@ pub(crate) mod parsing {
         #[cfg(feature = "full")]
         fn parse(input: ParseStream) -> Result<Self> {
             if input.peek(Token![+=]) {
-                input.parse().map(BinOp::AddEq)
+                input.parse().map(BinOp::AddAssign)
             } else if input.peek(Token![-=]) {
-                input.parse().map(BinOp::SubEq)
+                input.parse().map(BinOp::SubAssign)
             } else if input.peek(Token![*=]) {
-                input.parse().map(BinOp::MulEq)
+                input.parse().map(BinOp::MulAssign)
             } else if input.peek(Token![/=]) {
-                input.parse().map(BinOp::DivEq)
+                input.parse().map(BinOp::DivAssign)
             } else if input.peek(Token![%=]) {
-                input.parse().map(BinOp::RemEq)
+                input.parse().map(BinOp::RemAssign)
             } else if input.peek(Token![^=]) {
-                input.parse().map(BinOp::BitXorEq)
+                input.parse().map(BinOp::BitXorAssign)
             } else if input.peek(Token![&=]) {
-                input.parse().map(BinOp::BitAndEq)
+                input.parse().map(BinOp::BitAndAssign)
             } else if input.peek(Token![|=]) {
-                input.parse().map(BinOp::BitOrEq)
+                input.parse().map(BinOp::BitOrAssign)
             } else if input.peek(Token![<<=]) {
-                input.parse().map(BinOp::ShlEq)
+                input.parse().map(BinOp::ShlAssign)
             } else if input.peek(Token![>>=]) {
-                input.parse().map(BinOp::ShrEq)
+                input.parse().map(BinOp::ShrAssign)
             } else {
                 parse_binop(input)
             }
@@ -201,16 +201,16 @@ mod printing {
                 BinOp::Ne(t) => t.to_tokens(tokens),
                 BinOp::Ge(t) => t.to_tokens(tokens),
                 BinOp::Gt(t) => t.to_tokens(tokens),
-                BinOp::AddEq(t) => t.to_tokens(tokens),
-                BinOp::SubEq(t) => t.to_tokens(tokens),
-                BinOp::MulEq(t) => t.to_tokens(tokens),
-                BinOp::DivEq(t) => t.to_tokens(tokens),
-                BinOp::RemEq(t) => t.to_tokens(tokens),
-                BinOp::BitXorEq(t) => t.to_tokens(tokens),
-                BinOp::BitAndEq(t) => t.to_tokens(tokens),
-                BinOp::BitOrEq(t) => t.to_tokens(tokens),
-                BinOp::ShlEq(t) => t.to_tokens(tokens),
-                BinOp::ShrEq(t) => t.to_tokens(tokens),
+                BinOp::AddAssign(t) => t.to_tokens(tokens),
+                BinOp::SubAssign(t) => t.to_tokens(tokens),
+                BinOp::MulAssign(t) => t.to_tokens(tokens),
+                BinOp::DivAssign(t) => t.to_tokens(tokens),
+                BinOp::RemAssign(t) => t.to_tokens(tokens),
+                BinOp::BitXorAssign(t) => t.to_tokens(tokens),
+                BinOp::BitAndAssign(t) => t.to_tokens(tokens),
+                BinOp::BitOrAssign(t) => t.to_tokens(tokens),
+                BinOp::ShlAssign(t) => t.to_tokens(tokens),
+                BinOp::ShrAssign(t) => t.to_tokens(tokens),
             }
         }
     }
diff --git a/syn.json b/syn.json
index c1699ce1..4999bb9f 100644
--- a/syn.json
+++ b/syn.json
@@ -351,52 +351,52 @@
             "token": "Gt"
           }
         ],
-        "AddEq": [
+        "AddAssign": [
           {
             "token": "PlusEq"
           }
         ],
-        "SubEq": [
+        "SubAssign": [
           {
             "token": "MinusEq"
           }
         ],
-        "MulEq": [
+        "MulAssign": [
           {
             "token": "StarEq"
           }
         ],
-        "DivEq": [
+        "DivAssign": [
           {
             "token": "SlashEq"
           }
         ],
-        "RemEq": [
+        "RemAssign": [
           {
             "token": "PercentEq"
           }
         ],
-        "BitXorEq": [
+        "BitXorAssign": [
           {
             "token": "CaretEq"
           }
         ],
-        "BitAndEq": [
+        "BitAndAssign": [
           {
             "token": "AndEq"
           }
         ],
-        "BitOrEq": [
+        "BitOrAssign": [
           {
             "token": "OrEq"
           }
         ],
-        "ShlEq": [
+        "ShlAssign": [
           {
             "token": "ShlEq"
           }
         ],
-        "ShrEq": [
+        "ShrAssign": [
           {
             "token": "ShrEq"
           }


Test patch:
diff --git a/tests/debug/gen.rs b/tests/debug/gen.rs
index d2a61a6c..81a5cd46 100644
--- a/tests/debug/gen.rs
+++ b/tests/debug/gen.rs
@@ -253,44 +253,44 @@ impl Debug for Lite<syn::BinOp> {
                 formatter.write_str("BinOp::Gt")?;
                 Ok(())
             }
-            syn::BinOp::AddEq(_val) => {
-                formatter.write_str("BinOp::AddEq")?;
+            syn::BinOp::AddAssign(_val) => {
+                formatter.write_str("BinOp::AddAssign")?;
                 Ok(())
             }
-            syn::BinOp::SubEq(_val) => {
-                formatter.write_str("BinOp::SubEq")?;
+            syn::BinOp::SubAssign(_val) => {
+                formatter.write_str("BinOp::SubAssign")?;
                 Ok(())
             }
-            syn::BinOp::MulEq(_val) => {
-                formatter.write_str("BinOp::MulEq")?;
+            syn::BinOp::MulAssign(_val) => {
+                formatter.write_str("BinOp::MulAssign")?;
                 Ok(())
             }
-            syn::BinOp::DivEq(_val) => {
-                formatter.write_str("BinOp::DivEq")?;
+            syn::BinOp::DivAssign(_val) => {
+                formatter.write_str("BinOp::DivAssign")?;
                 Ok(())
             }
-            syn::BinOp::RemEq(_val) => {
-                formatter.write_str("BinOp::RemEq")?;
+            syn::BinOp::RemAssign(_val) => {
+                formatter.write_str("BinOp::RemAssign")?;
                 Ok(())
             }
-            syn::BinOp::BitXorEq(_val) => {
-                formatter.write_str("BinOp::BitXorEq")?;
+            syn::BinOp::BitXorAssign(_val) => {
+                formatter.write_str("BinOp::BitXorAssign")?;
                 Ok(())
             }
-            syn::BinOp::BitAndEq(_val) => {
-                formatter.write_str("BinOp::BitAndEq")?;
+            syn::BinOp::BitAndAssign(_val) => {
+                formatter.write_str("BinOp::BitAndAssign")?;
                 Ok(())
             }
-            syn::BinOp::BitOrEq(_val) => {
-                formatter.write_str("BinOp::BitOrEq")?;
+            syn::BinOp::BitOrAssign(_val) => {
+                formatter.write_str("BinOp::BitOrAssign")?;
                 Ok(())
             }
-            syn::BinOp::ShlEq(_val) => {
-                formatter.write_str("BinOp::ShlEq")?;
+            syn::BinOp::ShlAssign(_val) => {
+                formatter.write_str("BinOp::ShlAssign")?;
                 Ok(())
             }
-            syn::BinOp::ShrEq(_val) => {
-                formatter.write_str("BinOp::ShrEq")?;
+            syn::BinOp::ShrAssign(_val) => {
+                formatter.write_str("BinOp::ShrAssign")?;
                 Ok(())
             }
         }