Skip to content

Commit 46f902b

Browse files
committed
Rename export for shims::env::EnvVars
1 parent f451fe2 commit 46f902b

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

src/eval.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ use crate::{
1212
InterpResult, InterpError, InterpCx, StackPopCleanup, struct_error,
1313
Scalar, Tag, Pointer, FnVal,
1414
MemoryExtra, MiriMemoryKind, Evaluator, TlsEvalContextExt, HelpersEvalContextExt,
15-
ShimsEnvVars,
15+
EnvVars,
1616
};
1717

1818
/// Configuration needed to spawn a Miri instance.
@@ -39,9 +39,9 @@ pub fn create_ecx<'mir, 'tcx: 'mir>(
3939
Evaluator::new(config.communicate),
4040
MemoryExtra::new(StdRng::seed_from_u64(config.seed.unwrap_or(0)), config.validate),
4141
);
42-
43-
ShimsEnvVars::init(config.communicate, &mut ecx, &tcx);
44-
42+
// Complete initialization.
43+
EnvVars::init(&mut ecx, &tcx, config.communicate);
44+
// Setup first stack-frame
4545
let main_instance = ty::Instance::mono(ecx.tcx.tcx, main_id);
4646
let main_mir = ecx.load_mir(main_instance.def)?;
4747

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ pub use crate::shims::foreign_items::EvalContextExt as ForeignItemsEvalContextEx
3333
pub use crate::shims::intrinsics::EvalContextExt as IntrinsicsEvalContextExt;
3434
pub use crate::shims::tls::{EvalContextExt as TlsEvalContextExt, TlsData};
3535
pub use crate::shims::dlsym::{Dlsym, EvalContextExt as DlsymEvalContextExt};
36-
pub use crate::shims::env::{EnvVars as ShimsEnvVars};
36+
pub use crate::shims::env::EnvVars;
3737
pub use crate::operator::EvalContextExt as OperatorEvalContextExt;
3838
pub use crate::range_map::RangeMap;
3939
pub use crate::helpers::{EvalContextExt as HelpersEvalContextExt};

src/machine.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ impl MemoryExtra {
7878
pub struct Evaluator<'tcx> {
7979
/// Environment variables set by `setenv`.
8080
/// Miri does not expose env vars from the host to the emulated program.
81-
pub(crate) env_vars: ShimsEnvVars,
81+
pub(crate) env_vars: EnvVars,
8282

8383
/// Program arguments (`Option` because we can only initialize them after creating the ecx).
8484
/// These are *pointers* to argc/argv because macOS.
@@ -102,7 +102,7 @@ impl<'tcx> Evaluator<'tcx> {
102102
Evaluator {
103103
// `env_vars` could be initialized properly here if `Memory` were available before
104104
// calling this method.
105-
env_vars: ShimsEnvVars::default(),
105+
env_vars: EnvVars::default(),
106106
argc: None,
107107
argv: None,
108108
cmd_line: None,

src/shims/env.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ pub struct EnvVars {
1212

1313
impl EnvVars {
1414
pub(crate) fn init<'mir, 'tcx>(
15-
communicate: bool,
1615
ecx: &mut InterpCx<'mir, 'tcx, Evaluator<'tcx>>,
1716
tcx: &TyCtxt<'tcx>,
17+
communicate: bool,
1818
) {
1919
if communicate {
2020
for (name, value) in std::env::vars() {

0 commit comments

Comments
 (0)