Fix rebase fallout

This commit is contained in:
Oliver Scherer 2019-12-23 17:13:50 +01:00
parent aaffe12453
commit 12a4c2ca18
2 changed files with 6 additions and 1 deletions

View file

@ -5,7 +5,7 @@
use rustc::hir::def_id::DefId;
use rustc::mir::{
self,
interpret::{ConstValue, InterpResult, Scalar},
interpret::{ConstValue, GlobalId, InterpResult, Scalar},
BinOp,
};
use rustc::ty;

View file

@ -588,6 +588,11 @@ impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
// `StaticKind` once and for all.
return self.const_eval(GlobalId { instance, promoted: None });
}
ty::ConstKind::Infer(..)
| ty::ConstKind::Bound(..)
| ty::ConstKind::Placeholder(..) => {
bug!("eval_const_to_op: Unexpected ConstKind {:?}", val)
}
ty::ConstKind::Value(val_val) => val_val,
};
// Other cases need layout.