Skip to content

Commit 618dbfa

Browse files
committed
move required_consts check to general post-mono-check function
1 parent 3563f9c commit 618dbfa

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/helpers.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,9 +142,8 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
142142
fn eval_path_scalar(&self, path: &[&str]) -> Scalar<Provenance> {
143143
let this = self.eval_context_ref();
144144
let instance = this.resolve_path(path, Namespace::ValueNS);
145-
let cid = GlobalId { instance, promoted: None };
146145
// We don't give a span -- this isn't actually used directly by the program anyway.
147-
let const_val = this.eval_global(cid, None).unwrap_or_else(|err| {
146+
let const_val = this.eval_global(instance).unwrap_or_else(|err| {
148147
panic!("failed to evaluate required Rust item: {path:?}\n{err:?}")
149148
});
150149
this.read_scalar(&const_val)

0 commit comments

Comments
 (0)