]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs
Rollup merge of #104628 - alex-pinkus:revert-android-ndk-upgrade, r=pietroalbini
[rust.git] / compiler / rustc_trait_selection / src / traits / error_reporting / mod.rs
index 6e90b9446505e18b7d019e0399786c454394184b..c3547f64b5c9c747e1aa9c7a2804452e95a3f85b 100644 (file)
@@ -1729,7 +1729,7 @@ fn type_category(tcx: TyCtxt<'_>, t: Ty<'_>) -> Option<u32> {
                 ty::Bool => Some(0),
                 ty::Char => Some(1),
                 ty::Str => Some(2),
-                ty::Adt(def, _) if tcx.is_diagnostic_item(sym::String, def.did()) => Some(2),
+                ty::Adt(def, _) if Some(def.did()) == tcx.lang_items().string() => Some(2),
                 ty::Int(..)
                 | ty::Uint(..)
                 | ty::Float(..)