Rename const eval queries to reflect the validation changes
This commit is contained in:
@@ -889,7 +889,7 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
|
||||
} else {
|
||||
self.param_env
|
||||
};
|
||||
let val = self.tcx.const_eval_raw(param_env.and(gid))?;
|
||||
let val = self.tcx.const_eval(param_env.and(gid))?;
|
||||
self.raw_const_to_mplace(val)
|
||||
}
|
||||
|
||||
|
||||
@@ -469,7 +469,7 @@ impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> Memory<'mir, 'tcx, M> {
|
||||
// Notice that every static has two `AllocId` that will resolve to the same
|
||||
// thing here: one maps to `GlobalAlloc::Static`, this is the "lazy" ID,
|
||||
// and the other one is maps to `GlobalAlloc::Memory`, this is returned by
|
||||
// `const_eval_raw` and it is the "resolved" ID.
|
||||
// `const_eval` and it is the "resolved" ID.
|
||||
// The resolved ID is never used by the interpreted program, it is hidden.
|
||||
// This is relied upon for soundness of const-patterns; a pointer to the resolved
|
||||
// ID would "sidestep" the checks that make sure consts do not point to statics!
|
||||
|
||||
Reference in New Issue
Block a user