From: Christian Poveda Date: Fri, 11 Oct 2019 09:20:18 +0000 (-0500) Subject: Use existing tcx instead X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=60cf06a03fa06bc1c5e2981d4ad7f5496b06c62f;p=rust.git Use existing tcx instead --- diff --git a/src/shims/env.rs b/src/shims/env.rs index 6f32783d7a7..8c1645cde73 100644 --- a/src/shims/env.rs +++ b/src/shims/env.rs @@ -127,7 +127,7 @@ fn getcwd( let tcx = &{ this.tcx.tcx }; let buf = this.force_ptr(this.read_scalar(buf_op)?.not_undef()?)?; - let size = this.read_scalar(size_op)?.to_usize(&*this.tcx)?; + let size = this.read_scalar(size_op)?.to_usize(&*tcx)?; // If we cannot get the current directory, we return null match env::current_dir() { Ok(cwd) => { @@ -152,7 +152,7 @@ fn getcwd( } Err(e) => this.consume_io_error(e)?, } - Ok(Scalar::ptr_null(&*this.tcx)) + Ok(Scalar::ptr_null(&*tcx)) } fn chdir(&mut self, path_op: OpTy<'tcx, Tag>) -> InterpResult<'tcx, i32> {