Rollup merge of #64439 - 12101111:fix-owned-box, r=Centril
fix #64430, confusing `owned_box` error message in no_std build Fixes #64430
This commit is contained in:
commit
1c7959bb5d
4 changed files with 47 additions and 26 deletions
|
|
@ -2396,9 +2396,9 @@ impl<'tcx> TyCtxt<'tcx> {
|
|||
}
|
||||
|
||||
#[inline]
|
||||
pub fn mk_lang_item(self, ty: Ty<'tcx>, item: lang_items::LangItem) -> Ty<'tcx> {
|
||||
let def_id = self.require_lang_item(item, None);
|
||||
self.mk_generic_adt(def_id, ty)
|
||||
pub fn mk_lang_item(self, ty: Ty<'tcx>, item: lang_items::LangItem) -> Option<Ty<'tcx>> {
|
||||
let def_id = self.lang_items().require(item).ok()?;
|
||||
Some(self.mk_generic_adt(def_id, ty))
|
||||
}
|
||||
|
||||
#[inline]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue