}
let cid = key.value;
- let def = cid.instance.def.with_opt_param();
- let is_static = tcx.is_static(def.did);
+ let def = cid.instance.def.def_id();
+ let is_static = tcx.is_static(def);
let mut ecx = InterpCx::new(
tcx,
- tcx.def_span(def.did),
+ tcx.def_span(def),
key.param_env,
// Statics (and promoteds inside statics) may access other statics, because unlike consts
// they do not have to behave "as if" they were evaluated at runtime.
if matches!(err.error, InterpError::UndefinedBehavior(_)) {
diag.note(NOTE_ON_UNDEFINED_BEHAVIOR_ERROR);
}
- diag.note(&format!(
+ diag.note(format!(
"the raw bytes of the constant ({}",
display_allocation(
*ecx.tcx,