1 #![allow(clippy::uninlined_format_args)]
3 #[allow(unused_assignments)]
4 #[warn(clippy::misrefactored_assign_op, clippy::assign_op_pattern)]
25 // check that we don't lint on op assign impls, because that's just the way to impl them
27 use std::ops::{Mul, MulAssign};
29 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
32 impl Mul<i64> for Wrap {
35 fn mul(self, rhs: i64) -> Self {
40 impl MulAssign<i64> for Wrap {
41 fn mul_assign(&mut self, rhs: i64) {
48 let mut buf = Cow::Owned(String::from("bar"));
49 let cows = Cow::Borrowed("foo");
52 buf = buf + cows.clone();
54 // this should not as cow<str> Add is not commutative