diff options
| author | Ralf Jung <post@ralfj.de> | 2023-09-11 09:52:45 +0200 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2023-09-14 22:30:42 +0200 |
| commit | 89ac57db4dbc0a69a3d15b6818ca1de5bc5bd09c (patch) | |
| tree | 1087d83c38fecd0c82dc737e0c57780006422a62 /src/tools/miri | |
| parent | ccf817b9bbe449204a227430d0a84a4f1d1798cc (diff) | |
| download | rust-89ac57db4dbc0a69a3d15b6818ca1de5bc5bd09c.tar.gz rust-89ac57db4dbc0a69a3d15b6818ca1de5bc5bd09c.zip | |
move required_consts check to general post-mono-check function
Diffstat (limited to 'src/tools/miri')
| -rw-r--r-- | src/tools/miri/src/helpers.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/tools/miri/src/helpers.rs b/src/tools/miri/src/helpers.rs index 0c7e8278147..72d9dbd045d 100644 --- a/src/tools/miri/src/helpers.rs +++ b/src/tools/miri/src/helpers.rs @@ -142,9 +142,8 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> { fn eval_path_scalar(&self, path: &[&str]) -> Scalar<Provenance> { let this = self.eval_context_ref(); let instance = this.resolve_path(path, Namespace::ValueNS); - let cid = GlobalId { instance, promoted: None }; // We don't give a span -- this isn't actually used directly by the program anyway. - let const_val = this.eval_global(cid, None).unwrap_or_else(|err| { + let const_val = this.eval_global(instance).unwrap_or_else(|err| { panic!("failed to evaluate required Rust item: {path:?}\n{err:?}") }); this.read_scalar(&const_val) |
