1
Fork 0

interpret: reduce usage of TypingEnv::fully_monomorphized

This commit is contained in:
Ralf Jung 2024-12-09 09:27:18 +01:00
parent f33a8c6426
commit 0bb8615ed9
3 changed files with 9 additions and 8 deletions

View file

@ -248,10 +248,9 @@ impl<'tcx> CompileTimeInterpCx<'tcx> {
} else if self.tcx.is_lang_item(def_id, LangItem::PanicFmt) {
// For panic_fmt, call const_panic_fmt instead.
let const_def_id = self.tcx.require_lang_item(LangItem::ConstPanicFmt, None);
// FIXME(@lcnr): why does this use an empty env if we've got a `param_env` right here.
let new_instance = ty::Instance::expect_resolve(
*self.tcx,
ty::TypingEnv::fully_monomorphized(),
self.typing_env(),
const_def_id,
instance.args,
self.cur_span(),