From 1566db704d113ea6ed90f2b3927306bd84946dc2 Mon Sep 17 00:00:00 2001 From: dvermd <315743+dvermd@users.noreply.github.com> Date: Mon, 19 Oct 2020 21:38:36 +0200 Subject: [PATCH] Update clippy_lints/src/ref_option_ref.rs Co-authored-by: Philipp Krones --- clippy_lints/src/ref_option_ref.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clippy_lints/src/ref_option_ref.rs b/clippy_lints/src/ref_option_ref.rs index 902cd06f5279..4ab2d8025e08 100644 --- a/clippy_lints/src/ref_option_ref.rs +++ b/clippy_lints/src/ref_option_ref.rs @@ -40,7 +40,7 @@ impl<'tcx> LateLintPass<'tcx> for RefOptionRef { if let Some(res) = last.res; if let Some(def_id) = res.opt_def_id(); - if match_def_path(cx, def_id, &paths::OPTION); + if cx.tcx.is_diagnostic_item(sym!(option_type), def_id); if let Some(ref params) = last_path_segment(qpath).args ; if !params.parenthesized; if let Some(inner_ty) = params.args.iter().find_map(|arg| match arg {