about summary refs log tree commit diff
path: root/library/std/src/sys/pal/windows/os.rs
AgeCommit message (Collapse)AuthorLines
2025-08-26remove deprecated Error::description in implsMarijn Schouten-7/+1
2025-05-23GetUserProfileDirectoryW is now documented to always store the sizeRalf Jung-2/+0
2025-05-19windows: document that we rely on an undocumented property of ↵Ralf Jung-0/+2
GetUserProfileDirectoryW
2025-04-21Move `sys::pal::os::Env` into `sys::env`Thalia Archibald-132/+3
Although `Env` (as `Vars`), `Args`, path functions, and OS constants are publicly exposed via `std::env`, their implementations are each self-contained. Keep them separate in `std::sys` and make a new module, `sys::env`, for `Env`.
2025-01-03Fix UWP buildbdbai-2/+3
2024-11-04Fix and undeprecate home_dir()Kornel-2/+2
2024-07-29Reformat `use` declarations.Nicholas Nethercote-9/+4
The previous commit updated `rustfmt.toml` appropriately. This commit is the outcome of running `x fmt --all` with the new formatting options.
2024-07-15Deny more windows unsafe_op_in_unsafe_fnChris Denton-6/+11
2024-07-15Rollup merge of #127750 - ChrisDenton:safe-unsafe-unsafe, r=workingjubileeJubilee-0/+1
Make os/windows and pal/windows default to `#![deny(unsafe_op_in_unsafe_fn)]` This is to prevent regressions in modules that currently pass. I did also fix up a few trivial places where the module contained only one or two simple wrappers. In more complex cases we should try to ensure the `unsafe` blocks are appropriately scoped and have any appropriate safety comments. This does not fix the windows bits of #127747 but it should help prevent regressions until that is done and also make it more obvious specifically which modules need attention.
2024-07-15Make pal/windows default to deny unsafe in unsafeChris Denton-0/+1
2024-07-15Remove DWORDChris Denton-2/+2
2024-07-15Remove LPWSTRChris Denton-2/+2
2024-07-15Remove UINTChris Denton-1/+1
2024-06-09Migrate more things to WinErrorChris Denton-3/+4
2024-05-29Make `std::env::{set_var, remove_var}` unsafe in edition 2024Tobias Bucher-4/+4
Allow calling these functions without `unsafe` blocks in editions up until 2021, but don't trigger the `unused_unsafe` lint for `unsafe` blocks containing these functions. Fixes #27970. Fixes #90308. CC #124866.
2024-04-23windows fill_utf16_buf: explain the expected return valueRalf Jung-0/+2
2024-02-21rename ptr::invalid -> ptr::without_provenanceRalf Jung-1/+1
also introduce ptr::dangling matching NonNull::dangling
2024-02-16Remove cfg_attrSteven-1/+0
2024-02-16Use a hardcoded constant instead of calling OpenProcessToken.Steven-5/+26
Now that Win 7 support is dropped, we can resurrect #90144. GetCurrentProcessToken is defined in processthreadsapi.h as: FORCEINLINE HANDLE GetCurrentProcessToken ( VOID ) { return (HANDLE)(LONG_PTR) -4; } Since it's very unlikely that this constant will ever change, let's just use it instead of making calls to get the same information.
2024-01-11std: begin moving platform support modules into `pal`joboet-0/+368