Use TypingEnv::fully_monomorphized for evaluating const without generic param path

This commit is contained in:
tiif 2025-11-21 14:52:09 +00:00
parent 2c0f4860cc
commit 46d8adeb61

View file

@ -637,7 +637,7 @@ pub fn try_evaluate_const<'tcx>(
// Since there is no generic parameter, we can just drop the environment
// to prevent query cycle.
let typing_env = infcx.typing_env(ty::ParamEnv::empty());
let typing_env = ty::TypingEnv::fully_monomorphized();
(uv.args, typing_env)
}