if cid.promoted.is_none() {
let mut ref_tracking = RefTracking::new(mplace);
while let Some((mplace, path)) = ref_tracking.todo.pop() {
- ecx.validate_operand(mplace.into(), path, Some(&mut ref_tracking))?;
+ ecx.const_validate_operand(
+ mplace.into(),
+ path,
+ &mut ref_tracking,
+ /*may_ref_to_static*/ is_static,
+ )?;
}
}
// Now that we validated, turn this into a proper constant.
match tcx.const_eval_validated(key) {
// try again with reveal all as requested
Err(ErrorHandled::TooGeneric) => {}
- // dedupliate calls
+ // deduplicate calls
other => return other,
}
}
match tcx.const_eval_raw(key) {
// try again with reveal all as requested
Err(ErrorHandled::TooGeneric) => {}
- // dedupliate calls
+ // deduplicate calls
other => return other,
}
}