]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_middle/src/ty/sty.rs
Rollup merge of #104873 - RalfJung:therefore, r=Dylan-DPC
[rust.git] / compiler / rustc_middle / src / ty / sty.rs
index db18558e947a3f7e1b61d32d34d522a1ddc72b60..e7a751fa0afca004a5fc301477e48368897d58f0 100644 (file)
@@ -17,6 +17,7 @@
 use rustc_data_structures::intern::Interned;
 use rustc_hir as hir;
 use rustc_hir::def_id::DefId;
+use rustc_hir::LangItem;
 use rustc_index::vec::Idx;
 use rustc_macros::HashStable;
 use rustc_span::symbol::{kw, sym, Symbol};
@@ -2108,7 +2109,7 @@ pub fn ptr_metadata_ty(
 
             ty::Str | ty::Slice(_) => (tcx.types.usize, false),
             ty::Dynamic(..) => {
-                let dyn_metadata = tcx.lang_items().dyn_metadata().unwrap();
+                let dyn_metadata = tcx.require_lang_item(LangItem::DynMetadata, None);
                 (tcx.bound_type_of(dyn_metadata).subst(tcx, &[tail.into()]), false)
             },