make intern_const_alloc_recursive return error fix #78655
This commit is contained in:
parent
8e8939b804
commit
bd7229daf0
9 changed files with 64 additions and 11 deletions
|
@ -550,7 +550,7 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
|
|||
// Early-return cases.
|
||||
let val_val = match val.val {
|
||||
ty::ConstKind::Param(_) | ty::ConstKind::Bound(..) => throw_inval!(TooGeneric),
|
||||
ty::ConstKind::Error(_) => throw_inval!(TypeckError(ErrorReported)),
|
||||
ty::ConstKind::Error(_) => throw_inval!(AlreadyReported(ErrorReported)),
|
||||
ty::ConstKind::Unevaluated(def, substs, promoted) => {
|
||||
let instance = self.resolve(def, substs)?;
|
||||
return Ok(self.eval_to_allocation(GlobalId { instance, promoted })?.into());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue