]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_hir_typeck/src/method/suggest.rs
Auto merge of #103390 - compiler-errors:metadata-mod-regions, r=eholk
[rust.git] / compiler / rustc_hir_typeck / src / method / suggest.rs
index 9a66e73d9c2aa1838f7d7342d91b56ee73781d13..8190163cba15b4bb8fde3ae5d1f86f3aa2c0439b 100644 (file)
@@ -821,10 +821,10 @@ trait bound{s}",
                                 ty.is_str()
                                     || matches!(
                                         ty.kind(),
-                                        ty::Adt(adt, _) if self.tcx.is_diagnostic_item(sym::String, adt.did())
+                                        ty::Adt(adt, _) if Some(adt.did()) == self.tcx.lang_items().string()
                                     )
                             }
-                            ty::Adt(adt, _) => self.tcx.is_diagnostic_item(sym::String, adt.did()),
+                            ty::Adt(adt, _) => Some(adt.did()) == self.tcx.lang_items().string(),
                             _ => false,
                         };
                         if is_string_or_ref_str && item_name.name == sym::iter {