Skip to content

Commit 35a0f07

Browse files
authored
Rollup merge of #137650 - thaliaarchi:move-fs-pal, r=Noratrieb
Move `fs` into `sys` Move platform definitions of `fs` into `std::sys`, as part of rust-lang/rust#117276. cc `@joboet`
2 parents 17542ac + 12b7ab8 commit 35a0f07

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

tests/fail/shims/fs/isolated_file.stderr

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
error: unsupported operation: `open` not available when isolation is enabled
2-
--> RUSTLIB/std/src/sys/pal/PLATFORM/fs.rs:LL:CC
2+
--> RUSTLIB/std/src/sys/fs/PLATFORM.rs:LL:CC
33
|
44
LL | let fd = cvt_r(|| unsafe { open64(path.as_ptr(), flags, opts.mode as c_int) })?;
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `open` not available when isolation is enabled
66
|
77
= help: set `MIRIFLAGS=-Zmiri-disable-isolation` to disable isolation;
88
= help: or set `MIRIFLAGS=-Zmiri-isolation-error=warn` to make Miri return an error code from isolated operations (if supported for that operation) and continue with a warning
99
= note: BACKTRACE:
10-
= note: inside closure at RUSTLIB/std/src/sys/pal/PLATFORM/fs.rs:LL:CC
11-
= note: inside `std::sys::pal::PLATFORM::cvt_r::<i32, {closure@std::sys::pal::PLATFORM::fs::File::open_c::{closure#0}}>` at RUSTLIB/std/src/sys/pal/PLATFORM/mod.rs:LL:CC
12-
= note: inside `std::sys::pal::PLATFORM::fs::File::open_c` at RUSTLIB/std/src/sys/pal/PLATFORM/fs.rs:LL:CC
13-
= note: inside closure at RUSTLIB/std/src/sys/pal/PLATFORM/fs.rs:LL:CC
14-
= note: inside `std::sys::pal::PLATFORM::small_c_string::run_with_cstr_stack::<std::sys::pal::PLATFORM::fs::File>` at RUSTLIB/std/src/sys/pal/PLATFORM/small_c_string.rs:LL:CC
15-
= note: inside `std::sys::pal::PLATFORM::small_c_string::run_with_cstr::<std::sys::pal::PLATFORM::fs::File>` at RUSTLIB/std/src/sys/pal/PLATFORM/small_c_string.rs:LL:CC
16-
= note: inside `std::sys::pal::PLATFORM::small_c_string::run_path_with_cstr::<std::sys::pal::PLATFORM::fs::File>` at RUSTLIB/std/src/sys/pal/PLATFORM/small_c_string.rs:LL:CC
17-
= note: inside `std::sys::pal::PLATFORM::fs::File::open` at RUSTLIB/std/src/sys/pal/PLATFORM/fs.rs:LL:CC
10+
= note: inside closure at RUSTLIB/std/src/sys/fs/PLATFORM.rs:LL:CC
11+
= note: inside `std::sys::pal::PLATFORM::cvt_r::<i32, {closure@std::sys::fs::PLATFORM::File::open_c::{closure#0}}>` at RUSTLIB/std/src/sys/pal/PLATFORM/mod.rs:LL:CC
12+
= note: inside `std::sys::fs::PLATFORM::File::open_c` at RUSTLIB/std/src/sys/fs/PLATFORM.rs:LL:CC
13+
= note: inside closure at RUSTLIB/std/src/sys/fs/PLATFORM.rs:LL:CC
14+
= note: inside `std::sys::pal::PLATFORM::small_c_string::run_with_cstr_stack::<std::sys::fs::PLATFORM::File>` at RUSTLIB/std/src/sys/pal/PLATFORM/small_c_string.rs:LL:CC
15+
= note: inside `std::sys::pal::PLATFORM::small_c_string::run_with_cstr::<std::sys::fs::PLATFORM::File>` at RUSTLIB/std/src/sys/pal/PLATFORM/small_c_string.rs:LL:CC
16+
= note: inside `std::sys::pal::PLATFORM::small_c_string::run_path_with_cstr::<std::sys::fs::PLATFORM::File>` at RUSTLIB/std/src/sys/pal/PLATFORM/small_c_string.rs:LL:CC
17+
= note: inside `std::sys::fs::PLATFORM::File::open` at RUSTLIB/std/src/sys/fs/PLATFORM.rs:LL:CC
1818
= note: inside `std::fs::OpenOptions::_open` at RUSTLIB/std/src/fs.rs:LL:CC
1919
= note: inside `std::fs::OpenOptions::open::<&std::path::Path>` at RUSTLIB/std/src/fs.rs:LL:CC
2020
= note: inside `std::fs::File::open::<&str>` at RUSTLIB/std/src/fs.rs:LL:CC

tests/ui.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -270,13 +270,13 @@ regexes! {
270270
// erase thread caller ids
271271
r"call [0-9]+" => "call ID",
272272
// erase platform module paths
273-
"sys::pal::[a-z]+::" => "sys::pal::PLATFORM::",
273+
r"\bsys::([a-z_]+)::[a-z]+::" => "sys::$1::PLATFORM::",
274274
// Windows file paths
275275
r"\\" => "/",
276276
// erase Rust stdlib path
277277
"[^ \n`]*/(rust[^/]*|checkout)/library/" => "RUSTLIB/",
278278
// erase platform file paths
279-
"sys/pal/[a-z]+/" => "sys/pal/PLATFORM/",
279+
r"\bsys/([a-z_]+)/[a-z]+\b" => "sys/$1/PLATFORM",
280280
// erase paths into the crate registry
281281
r"[^ ]*/\.?cargo/registry/.*/(.*\.rs)" => "CARGO_REGISTRY/.../$1",
282282
}

0 commit comments

Comments
 (0)