1
Fork 0

Rollup merge of #134058 - RalfJung:interpret-typing-env, r=lcnr

interpret: reduce usage of TypingEnv::fully_monomorphized

r? `@lcnr`
This commit is contained in:
Matthias Krüger 2024-12-13 17:25:29 +01:00 committed by GitHub
commit 97dc513850
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 9 additions and 8 deletions

View file

@ -249,10 +249,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(),