Skip to content

Commit 60cf06a

Browse files
committed
Use existing tcx instead
1 parent 67ea454 commit 60cf06a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/shims/env.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
127127
let tcx = &{ this.tcx.tcx };
128128

129129
let buf = this.force_ptr(this.read_scalar(buf_op)?.not_undef()?)?;
130-
let size = this.read_scalar(size_op)?.to_usize(&*this.tcx)?;
130+
let size = this.read_scalar(size_op)?.to_usize(&*tcx)?;
131131
// If we cannot get the current directory, we return null
132132
match env::current_dir() {
133133
Ok(cwd) => {
@@ -152,7 +152,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
152152
}
153153
Err(e) => this.consume_io_error(e)?,
154154
}
155-
Ok(Scalar::ptr_null(&*this.tcx))
155+
Ok(Scalar::ptr_null(&*tcx))
156156
}
157157

158158
fn chdir(&mut self, path_op: OpTy<'tcx, Tag>) -> InterpResult<'tcx, i32> {

0 commit comments

Comments
 (0)