X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Fshims%2Fenv.rs;h=979b3b6cfa45186713752af16be6151cc4dafe53;hb=72bd25de83bc1139829656a1b84a4fc04faa0554;hp=7e2df4f985d19e48449c1693356e226a7303ce46;hpb=283a130ddafa01537123b0650f869abc14886911;p=rust.git diff --git a/src/shims/env.rs b/src/shims/env.rs index 7e2df4f985d..979b3b6cfa4 100644 --- a/src/shims/env.rs +++ b/src/shims/env.rs @@ -134,7 +134,7 @@ fn getcwd( let erange = this.eval_libc("ERANGE")?; this.set_last_error(erange)?; } - Err(e) => this.consume_io_error(e)?, + Err(e) => this.set_last_error_from_io_error(e)?, } Ok(Scalar::ptr_null(&*this.tcx)) } @@ -149,7 +149,7 @@ fn chdir(&mut self, path_op: OpTy<'tcx, Tag>) -> InterpResult<'tcx, i32> { match env::set_current_dir(path) { Ok(()) => Ok(0), Err(e) => { - this.consume_io_error(e)?; + this.set_last_error_from_io_error(e)?; Ok(-1) } }