]> git.lizzy.rs Git - rust.git/blobdiff - src/tools/clippy/clippy_lints/src/ref_option_ref.rs
Auto merge of #102755 - pcc:data-local-tmp, r=Mark-Simulacrum
[rust.git] / src / tools / clippy / clippy_lints / src / ref_option_ref.rs
index 909d6971a5497305a7937bd7b70984e7ffb729b6..42514f861be1c25f33bcca47ef88ac7a2cef5b47 100644 (file)
@@ -43,8 +43,7 @@ fn check_ty(&mut self, cx: &LateContext<'tcx>, ty: &'tcx Ty<'tcx>) {
             if mut_ty.mutbl == Mutability::Not;
             if let TyKind::Path(ref qpath) = &mut_ty.ty.kind;
             let last = last_path_segment(qpath);
-            if let Some(res) = last.res;
-            if let Some(def_id) = res.opt_def_id();
+            if let Some(def_id) = last.res.opt_def_id();
 
             if cx.tcx.is_diagnostic_item(sym::Option, def_id);
             if let Some(params) = last_path_segment(qpath).args ;