From eec856bfbcd79d12352f81b44a9f04e5bb06bda5 Mon Sep 17 00:00:00 2001 From: Cameron Steffen Date: Sat, 2 Oct 2021 18:51:01 -0500 Subject: Make diangostic item names consistent --- compiler/rustc_lint/src/methods.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compiler/rustc_lint/src/methods.rs') diff --git a/compiler/rustc_lint/src/methods.rs b/compiler/rustc_lint/src/methods.rs index 8732845af0c..5558947de0c 100644 --- a/compiler/rustc_lint/src/methods.rs +++ b/compiler/rustc_lint/src/methods.rs @@ -84,7 +84,7 @@ fn lint_cstring_as_ptr( ) { let source_type = cx.typeck_results().expr_ty(source); if let ty::Adt(def, substs) = source_type.kind() { - if cx.tcx.is_diagnostic_item(sym::result_type, def.did) { + if cx.tcx.is_diagnostic_item(sym::Result, def.did) { if let ty::Adt(adt, _) = substs.type_at(0).kind() { if cx.tcx.is_diagnostic_item(sym::cstring_type, adt.did) { cx.struct_span_lint(TEMPORARY_CSTRING_AS_PTR, as_ptr_span, |diag| { -- cgit 1.4.1-3-g733a5