use clippy_utils::diagnostics::span_lint_and_sugg;
use clippy_utils::source::snippet_with_applicability;
-use clippy_utils::ty::is_type_diagnostic_item;
+use clippy_utils::ty::is_type_lang_item;
use rustc_errors::Applicability;
-use rustc_hir::Expr;
+use rustc_hir::{Expr, LangItem};
use rustc_lint::LateContext;
-use rustc_span::sym;
use super::BYTES_NTH;
let ty = cx.typeck_results().expr_ty(recv).peel_refs();
let caller_type = if ty.is_str() {
"str"
- } else if is_type_diagnostic_item(cx, ty, sym::String) {
+ } else if is_type_lang_item(cx, ty, LangItem::String) {
"String"
} else {
return;