query_name_of_opt_const_arg -> query_name_opt_const_arg
This commit is contained in:
parent
536674fb69
commit
8160bfa39c
6 changed files with 10 additions and 10 deletions
|
@ -343,7 +343,7 @@ pub fn eval_to_allocation_raw_provider<'tcx>(
|
|||
// deny-by-default lint
|
||||
_ => {
|
||||
if let Some(p) = cid.promoted {
|
||||
let span = tcx.promoted_mir_of_opt_const_arg(def.to_global())[p].span;
|
||||
let span = tcx.promoted_mir_opt_const_arg(def.to_global())[p].span;
|
||||
if let err_inval!(ReferencedConstant) = err.error {
|
||||
Err(err.report_as_error(
|
||||
tcx.at(span),
|
||||
|
|
|
@ -477,12 +477,12 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
|
|||
}
|
||||
trace!("load mir(instance={:?}, promoted={:?})", instance, promoted);
|
||||
if let Some(promoted) = promoted {
|
||||
return Ok(&self.tcx.promoted_mir_of_opt_const_arg(def)[promoted]);
|
||||
return Ok(&self.tcx.promoted_mir_opt_const_arg(def)[promoted]);
|
||||
}
|
||||
match instance {
|
||||
ty::InstanceDef::Item(def) => {
|
||||
if self.tcx.is_mir_available(def.did) {
|
||||
Ok(self.tcx.optimized_mir_of_opt_const_arg(def))
|
||||
Ok(self.tcx.optimized_mir_opt_const_arg(def))
|
||||
} else {
|
||||
throw_unsup!(NoMirFor(def.did))
|
||||
}
|
||||
|
|
|
@ -332,7 +332,7 @@ fn mir_promoted(
|
|||
// this point, before we steal the mir-const result.
|
||||
// Also this means promotion can rely on all const checks having been done.
|
||||
let _ = tcx.mir_const_qualif_opt_const_arg(def);
|
||||
let _ = tcx.mir_abstract_const_of_opt_const_arg(def.to_global());
|
||||
let _ = tcx.mir_abstract_const_opt_const_arg(def.to_global());
|
||||
let mut body = tcx.mir_const(def).steal();
|
||||
|
||||
let mut required_consts = Vec::new();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue