]> git.lizzy.rs Git - rust.git/blobdiff - clippy_lints/src/unwrap.rs
Rollup merge of #83092 - petrochenkov:qspan, r=estebank
[rust.git] / clippy_lints / src / unwrap.rs
index 6a87f534369803dcc60d37bb78066fb4ea8a1d17..2fb0463c5a6c250c646ceb5cdcd2e795f5c39df4 100644 (file)
@@ -1,6 +1,5 @@
 use crate::utils::{
-    differing_macro_contexts, is_type_diagnostic_item, span_lint_and_then,
-    usage::is_potentially_mutated,
+    differing_macro_contexts, is_type_diagnostic_item, span_lint_and_then, usage::is_potentially_mutated,
 };
 use if_chain::if_chain;
 use rustc_hir::intravisit::{walk_expr, walk_fn, FnKind, NestedVisitorMap, Visitor};
@@ -109,7 +108,7 @@ fn is_relevant_result_call(cx: &LateContext<'_>, ty: Ty<'_>, method_name: &str)
             },
             _ => (),
         }
-    } else if let ExprKind::Unary(UnOp::UnNot, expr) = &expr.kind {
+    } else if let ExprKind::Unary(UnOp::Not, expr) = &expr.kind {
         return collect_unwrap_info(cx, expr, branch, !invert);
     } else {
         if_chain! {