Skip to content

Commit b1fca61

Browse files
committed
Use already available tcx
1 parent 07abfb3 commit b1fca61

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) => {
@@ -148,7 +148,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
148148
}
149149
Err(e) => this.consume_io_error(e)?,
150150
}
151-
Ok(Scalar::ptr_null(&*this.tcx))
151+
Ok(Scalar::ptr_null(&*tcx))
152152
}
153153

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

0 commit comments

Comments
 (0)