rust/library/std/src
Matthias Krüger fb6d10e13b
Rollup merge of #138832 - ChrisDenton:with_native_path, r=joboet
Start using `with_native_path` in `std::sys::fs`

Ideally, each platform should use their own native path type internally. This will, for example, allow passing a `CStr` directly to `std::fs::File::open` and therefore avoid the need for allocating a new null-terminated C string.

However, doing that for every function and platform all at once makes for a large PR that is way too prone to breaking. So this PR does some minimal refactoring which should help progress towards that goal. The changes are Unix-only and even then I avoided functions that require more changes so that this PR is just moving things around.

r? joboet
2025-03-29 21:08:12 +01:00
..
backtrace
collections Rollup merge of #137870 - karolzwolak:lazylock-const-hashmaps-137566, r=cuviper 2025-03-14 01:37:30 -04:00
ffi Specialize constructing OsString from strings 2025-02-28 13:50:31 -08:00
fs Test windows file type equality 2025-03-18 16:46:56 +00:00
hash remove const_hash feature leftovers 2024-11-02 11:27:14 +01:00
io io::Take: avoid new BorrowedBuf creation in some case 2025-03-28 16:36:49 +01:00
net Update test for SGX now implementing read_buf 2025-03-17 17:18:05 -07:00
os Trusty: Fix build for anonymous pipes and std::sys::process 2025-03-23 19:32:20 -07:00
prelude Implement #[define_opaque] attribute for functions. 2025-03-11 12:05:02 +00:00
process std: Apply deprecated_safe_2024 2025-02-13 13:10:28 -08:00
sync Auto merge of #137237 - cuviper:stage0, r=Mark-Simulacrum 2025-02-23 11:12:56 +00:00
sys Rollup merge of #138832 - ChrisDenton:with_native_path, r=joboet 2025-03-29 21:08:12 +01:00
sys_common Move fs into sys 2025-03-08 16:22:37 -08:00
thread Auto merge of #138702 - m-ou-se:spawn-in-atexit, r=Mark-Simulacrum 2025-03-27 21:46:58 +00:00
alloc.rs Mark imports of #[rustc_std_internal_symbol] items with this attribute 2025-03-17 14:06:56 +00:00
ascii.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
backtrace.rs Implement #[define_opaque] attribute for functions. 2025-03-11 12:05:02 +00:00
bstr.rs Implement ByteStr and ByteString types 2025-01-11 06:35:21 +02:00
env.rs Rollup merge of #136320 - RalfJung:exit, r=the8472 2025-03-18 10:09:28 +01:00
error.rs Move std::error unit tests to integration tests 2025-01-26 10:28:04 +00:00
f16.rs Rollup merge of #137357 - syvb:sv/log-docs, r=tgross35 2025-03-21 06:56:45 +01:00
f32.rs Rollup merge of #137357 - syvb:sv/log-docs, r=tgross35 2025-03-21 06:56:45 +01:00
f64.rs Rollup merge of #137357 - syvb:sv/log-docs, r=tgross35 2025-03-21 06:56:45 +01:00
f128.rs Rollup merge of #137357 - syvb:sv/log-docs, r=tgross35 2025-03-21 06:56:45 +01:00
fs.rs Rollup merge of #138832 - ChrisDenton:with_native_path, r=joboet 2025-03-29 21:08:12 +01:00
keyword_docs.rs Migrate std to Rust 2024 2025-03-11 09:46:34 -07:00
lib.miri.rs add 'x.py miri', and make it work for 'library/{core,alloc,std}' 2024-04-03 20:27:20 +02:00
lib.rs Rollup merge of #137492 - nabijaczleweli:master, r=thomcc 2025-03-16 13:19:52 +08:00
macros.rs fix doc path in std::fmt macro 2025-02-25 09:08:22 +05:30
num.rs Move std::num unit tests to integration tests 2025-01-26 10:28:04 +00:00
panic.rs add last std diagnostic items for clippy 2025-02-18 10:54:37 +01:00
panicking.rs Mark imports of #[rustc_std_internal_symbol] items with this attribute 2025-03-17 14:06:56 +00:00
pat.rs Add pattern types to parser 2024-04-08 11:57:17 +00:00
path.rs Remove has_redox_scheme 2025-03-13 20:09:07 +00:00
process.rs Fix formatting nit in process.rs 2025-03-28 13:22:09 +01:00
random.rs Unify cygwin & horizon random impl 2025-03-10 21:23:32 +08:00
rt.rs Rollup merge of #135446 - klensy:panic_immediate_abort_ext, r=Mark-Simulacrum 2025-01-20 12:38:32 +08:00
test_helpers.rs std: get rid of sys_common::io 2025-02-07 16:54:07 +01:00
time.rs Rollup merge of #136301 - hkBst:patch-33, r=thomcc 2025-02-19 18:52:04 +01:00