1
Fork 0

Unify the names of const eval queries and their return types

This commit is contained in:
Oliver Scherer 2020-08-20 18:55:07 +02:00
parent 69a6be73e6
commit 888afd50d9
12 changed files with 38 additions and 36 deletions

View file

@ -553,7 +553,7 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
ty::ConstKind::Error(_) => throw_inval!(TypeckError(ErrorReported)),
ty::ConstKind::Unevaluated(def, substs, promoted) => {
let instance = self.resolve(def.did, substs)?;
return Ok(self.const_eval(GlobalId { instance, promoted })?.into());
return Ok(self.eval_to_allocation(GlobalId { instance, promoted })?.into());
}
ty::ConstKind::Infer(..)
| ty::ConstKind::Bound(..)