]> git.lizzy.rs Git - rust.git/blobdiff - clippy_lints/src/assign_ops.rs
rustup https://github.com/rust-lang/rust/pull/68944
[rust.git] / clippy_lints / src / assign_ops.rs
index 7ad0ce2320232db5939c054e85e3dce8c6b1fd66..b6fb6fdd2cc04aa95b6c87299f2b08139b4942be 100644 (file)
@@ -231,7 +231,9 @@ fn lint_misrefactored_assign_op(
 
 #[must_use]
 fn is_commutative(op: hir::BinOpKind) -> bool {
-    use rustc_hir::BinOpKind::*;
+    use rustc_hir::BinOpKind::{
+        Add, And, BitAnd, BitOr, BitXor, Div, Eq, Ge, Gt, Le, Lt, Mul, Ne, Or, Rem, Shl, Shr, Sub,
+    };
     match op {
         Add | Mul | And | Or | BitXor | BitAnd | BitOr | Eq | Ne => true,
         Sub | Div | Rem | Shl | Shr | Lt | Le | Ge | Gt => false,
@@ -254,7 +256,7 @@ fn visit_expr(&mut self, expr: &'tcx hir::Expr<'_>) {
 
         walk_expr(self, expr);
     }
-    fn nested_visit_map(&mut self) -> NestedVisitorMap<'_, Self::Map> {
+    fn nested_visit_map(&mut self) -> NestedVisitorMap<Self::Map> {
         NestedVisitorMap::None
     }
 }