Make diangostic item names consistent
This commit is contained in:
@@ -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| {
|
||||
|
||||
Reference in New Issue
Block a user