about summary refs log tree commit diff
path: root/library/std/src/sys/os_str
AgeCommit message (Collapse)AuthorLines
2024-11-12Make `CloneToUninit` dyn-compatibleZachary S-6/+6
2024-09-25Use `&raw` in the standard libraryJosh Stone-4/+2
Since the stabilization in #127679 has reached stage0, 1.82-beta, we can start using `&raw` freely, and even the soft-deprecated `ptr::addr_of!` and `ptr::addr_of_mut!` can stop allowing the unstable feature. I intentionally did not change any documentation or tests, but the rest of those macro uses are all now using `&raw const` or `&raw mut` in the standard library.
2024-09-22Reformat using the new identifier sorting from rustfmtMichael Goulet-1/+1
2024-07-29Sparkle some attributes over `CloneToUninit` stuffPavel Grigorenko-0/+2
2024-07-29impl CloneToUninit for Path and OsStrPavel Grigorenko-0/+24
2024-07-29Reformat `use` declarations.Nicholas Nethercote-5/+2
The previous commit updated `rustfmt.toml` appropriately. This commit is the outcome of running `x fmt --all` with the new formatting options.
2024-07-17forbid(unsafe_op_in_unsafe_fn) in sys/os_strChris Denton-2/+2
2024-07-15Deny more windows unsafe_op_in_unsafe_fnChris Denton-2/+3
2024-06-25`PathBuf::as_mut_vec` removed and verified for UEFI and Windows platforms ↵ash-8/+23
#126333
2024-06-25inner truncate methods for UEFI platformsash-0/+5
2024-06-20Convert some module-level `//` and `///` comments to `//!`.Nicholas Nethercote-2/+3
This makes their intent and expected location clearer. We see some examples where these comments were not clearly separate from `use` declarations, which made it hard to understand what the comment is describing.
2024-06-04impl OsString::leak & PathBuf::leakschvv31n-0/+10
2024-04-26Rollup merge of #124410 - RalfJung:path-buf-transmute, r=NilstriebJacob Pratt-0/+12
PathBuf: replace transmuting by accessor functions The existing `repr(transparent)` was anyway insufficient as `OsString` was not `repr(transparent)`. And furthermore, on Windows it was blatantly wrong as `OsString` wraps `Wtf8Buf` which is a `repr(Rust)` type with 2 fields: https://github.com/rust-lang/rust/blob/51a7396ad3d78d9326ee1537b9ff29ab3919556f/library/std/src/sys_common/wtf8.rs#L131-L146 So let's just be honest about what happens and add accessor methods that make this abstraction-breaking act of PathBuf visible on the APIs that it pierces through. Fixes https://github.com/rust-lang/rust/issues/124409
2024-04-26PathBuf: replace transmuting by accessor functionsRalf Jung-0/+12
2024-04-24Stabilize Utf8ChunksDavid Tolnay-4/+2
2024-01-21Move `OsStr::slice_encoded_bytes` validation to platform modulesJan Verbeek-1/+49
On Windows and UEFI this improves performance and error messaging. On other platforms we optimize the fast path a bit more. This also prepares for later relaxing the checks on certain platforms.
2024-01-15std: move OS String implementation into `sys`joboet-0/+561