]> git.lizzy.rs Git - rust.git/blobdiff - src/tools/clippy/clippy_lints/src/swap.rs
Rollup merge of #87528 - :stack_overflow_obsd, r=joshtriplett
[rust.git] / src / tools / clippy / clippy_lints / src / swap.rs
index f126908e84b037716fcca1dfca70d532c6734e4c..ef26de5b6b933dd810b9a0c845e2269efab2fb3b 100644 (file)
@@ -86,8 +86,8 @@ fn generate_swap_warning(cx: &LateContext<'_>, e1: &Expr<'_>, e2: &Expr<'_>, spa
 
                     if matches!(ty.kind(), ty::Slice(_))
                         || matches!(ty.kind(), ty::Array(_, _))
-                        || is_type_diagnostic_item(cx, ty, sym::vec_type)
-                        || is_type_diagnostic_item(cx, ty, sym::vecdeque_type)
+                        || is_type_diagnostic_item(cx, ty, sym::Vec)
+                        || is_type_diagnostic_item(cx, ty, sym::VecDeque)
                     {
                         let slice = Sugg::hir_with_applicability(cx, lhs1, "<slice>", &mut applicability);
                         span_lint_and_sugg(
@@ -231,7 +231,7 @@ fn check_xor_swap(cx: &LateContext<'_>, block: &Block<'_>) {
     }
 }
 
-/// Returns the lhs and rhs of an xor assignment statement.  
+/// Returns the lhs and rhs of an xor assignment statement.
 fn extract_sides_of_xor_assign<'a, 'hir>(stmt: &'a Stmt<'hir>) -> Option<(&'a Expr<'hir>, &'a Expr<'hir>)> {
     if let StmtKind::Semi(expr) = stmt.kind {
         if let ExprKind::AssignOp(