Fix rebase fallout
This commit is contained in:
parent
6f84d6edf1
commit
d34232bcaf
1 changed files with 6 additions and 3 deletions
|
@ -30,7 +30,7 @@ use syntax::ast::Mutability;
|
||||||
use super::{
|
use super::{
|
||||||
Pointer, AllocId, Allocation, ConstValue, GlobalId,
|
Pointer, AllocId, Allocation, ConstValue, GlobalId,
|
||||||
EvalResult, Scalar, EvalErrorKind, AllocType, PointerArithmetic,
|
EvalResult, Scalar, EvalErrorKind, AllocType, PointerArithmetic,
|
||||||
Machine, MemoryAccess, AllocMap, MayLeak, ScalarMaybeUndef,
|
Machine, MemoryAccess, AllocMap, MayLeak, ScalarMaybeUndef, ErrorHandled,
|
||||||
};
|
};
|
||||||
|
|
||||||
#[derive(Debug, PartialEq, Eq, Copy, Clone, Hash)]
|
#[derive(Debug, PartialEq, Eq, Copy, Clone, Hash)]
|
||||||
|
@ -370,10 +370,13 @@ impl<'a, 'mir, 'tcx, M: Machine<'a, 'mir, 'tcx>> Memory<'a, 'mir, 'tcx, M> {
|
||||||
};
|
};
|
||||||
// use the raw query here to break validation cycles. Later uses of the static will call the
|
// use the raw query here to break validation cycles. Later uses of the static will call the
|
||||||
// full query anyway
|
// full query anyway
|
||||||
tcx.const_eval_raw(ty::ParamEnv::reveal_all().and(gid)).map_err(|_| {
|
tcx.const_eval_raw(ty::ParamEnv::reveal_all().and(gid)).map_err(|err| {
|
||||||
// no need to report anything, the const_eval call takes care of that for statics
|
// no need to report anything, the const_eval call takes care of that for statics
|
||||||
assert!(tcx.is_static(def_id).is_some());
|
assert!(tcx.is_static(def_id).is_some());
|
||||||
EvalErrorKind::ReferencedConstant.into()
|
match err {
|
||||||
|
ErrorHandled::Reported => EvalErrorKind::ReferencedConstant.into(),
|
||||||
|
ErrorHandled::TooGeneric => EvalErrorKind::TooGeneric.into(),
|
||||||
|
}
|
||||||
}).map(|const_val| {
|
}).map(|const_val| {
|
||||||
if let ConstValue::ByRef(_, allocation, _) = const_val.val {
|
if let ConstValue::ByRef(_, allocation, _) = const_val.val {
|
||||||
// We got tcx memory. Let the machine figure out whether and how to
|
// We got tcx memory. Let the machine figure out whether and how to
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue