1
Fork 0

Add TyCtxt::is_lang_item

This commit is contained in:
Michael Goulet 2024-06-14 14:18:56 -04:00
parent f8e5660532
commit d5c48ebc71
6 changed files with 42 additions and 40 deletions

View file

@ -338,7 +338,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
let make_freeze_obl = |ty| {
let trait_ref = ty::TraitRef::new(
tcx,
tcx.lang_items().freeze_trait().unwrap(),
tcx.require_lang_item(LangItem::Freeze, None),
[ty::GenericArg::from(ty)],
);
Obligation::with_depth(