Skip to content

Commit 03f665c

Browse files
Rollup merge of rust-lang#123970 - risc0:erik/zkvm-fix-os-str, r=joboet
zkvm: fix references to `os_str` module The `os_str` module has been moved to `sys`. This change fixes build issues by changing `use` to point to `crate::sys::os_str`.
2 parents 94831ff + 87f16a3 commit 03f665c

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

std/src/sys/pal/zkvm/args.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
use super::{abi, WORD_SIZE};
22
use crate::ffi::OsString;
33
use crate::fmt;
4+
use crate::sys::os_str;
45
use crate::sys_common::FromInner;
56

67
pub struct Args {
@@ -33,7 +34,7 @@ impl Args {
3334
// "os_str".
3435
let arg_bytes: &[u8] =
3536
unsafe { crate::slice::from_raw_parts(words.cast() as *const u8, arg_len) };
36-
OsString::from_inner(super::os_str::Buf { inner: arg_bytes.to_vec() })
37+
OsString::from_inner(os_str::Buf { inner: arg_bytes.to_vec() })
3738
}
3839
}
3940

std/src/sys/pal/zkvm/os.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ use crate::fmt;
55
use crate::io;
66
use crate::marker::PhantomData;
77
use crate::path::{self, PathBuf};
8+
use crate::sys::os_str;
89
use crate::sys_common::FromInner;
910

1011
pub fn errno() -> i32 {
@@ -111,7 +112,7 @@ pub fn getenv(varname: &OsStr) -> Option<OsString> {
111112
// reimplement "os_str" instead of just using the generic unix
112113
// "os_str".
113114
let u8s: &[u8] = unsafe { crate::slice::from_raw_parts(words.cast() as *const u8, nbytes) };
114-
Some(OsString::from_inner(super::os_str::Buf { inner: u8s.to_vec() }))
115+
Some(OsString::from_inner(os_str::Buf { inner: u8s.to_vec() }))
115116
}
116117

117118
pub fn setenv(_: &OsStr, _: &OsStr) -> io::Result<()> {

0 commit comments

Comments
 (0)