]> git.lizzy.rs Git - rust.git/blobdiff - src/tools/clippy/clippy_lints/src/if_let_mutex.rs
Rollup merge of #87528 - :stack_overflow_obsd, r=joshtriplett
[rust.git] / src / tools / clippy / clippy_lints / src / if_let_mutex.rs
index ef72b88b3c7735fed581648e8df34c8ad250f253..a4118bf54b68313617425862dbe87ed5aae80826 100644 (file)
@@ -8,6 +8,7 @@
 use rustc_lint::{LateContext, LateLintPass};
 use rustc_middle::hir::map::Map;
 use rustc_session::{declare_lint_pass, declare_tool_lint};
+use rustc_span::sym;
 
 declare_clippy_lint! {
     /// ### What it does
@@ -141,7 +142,7 @@ fn is_mutex_lock_call<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) -> Opt
         if let ExprKind::MethodCall(path, _span, [self_arg, ..], _) = &expr.kind;
         if path.ident.as_str() == "lock";
         let ty = cx.typeck_results().expr_ty(self_arg);
-        if is_type_diagnostic_item(cx, ty, sym!(mutex_type));
+        if is_type_diagnostic_item(cx, ty, sym::Mutex);
         then {
             Some(self_arg)
         } else {