about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--clippy_lints/src/loops/manual_memcpy.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/clippy_lints/src/loops/manual_memcpy.rs b/clippy_lints/src/loops/manual_memcpy.rs
index fad96c2d5c0..11660a8fe0d 100644
--- a/clippy_lints/src/loops/manual_memcpy.rs
+++ b/clippy_lints/src/loops/manual_memcpy.rs
@@ -203,8 +203,11 @@ struct MinifyingSugg<'a>(Sugg<'a>);
 
 impl<'a> MinifyingSugg<'a> {
     fn as_str(&self) -> &str {
-        let (Sugg::NonParen(s) | Sugg::MaybeParen(s) | Sugg::BinOp(_, s)) = &self.0;
-        s.as_ref()
+        // HACK: Don't sync to Clippy! Required because something with the `or_patterns` feature
+        // changed and this would now require parentheses.
+        match &self.0 {
+            Sugg::NonParen(s) | Sugg::MaybeParen(s) | Sugg::BinOp(_, s) => s.as_ref(),
+        }
     }
 
     fn into_sugg(self) -> Sugg<'a> {