1
Fork 0

move fn is_item_raw to TypingEnv

This commit is contained in:
lcnr 2024-11-19 16:13:55 +01:00
parent 89b6885529
commit 948cec0fad
60 changed files with 181 additions and 168 deletions

View file

@ -667,7 +667,7 @@ impl<'tcx> interpret::Machine<'tcx> for CompileTimeMachine<'tcx> {
.is_some_and(|p| !p.immutable())
{
// That next check is expensive, that's why we have all the guards above.
let is_immutable = ty.is_freeze(*ecx.tcx, ecx.param_env);
let is_immutable = ty.is_freeze(*ecx.tcx, ecx.typing_env());
let place = ecx.ref_to_mplace(val)?;
let new_place = if is_immutable {
place.map_provenance(CtfeProvenance::as_immutable)