Commit Graph

14 Commits

Author SHA1 Message Date
joboet
c14d137bfc std: update internal uses of io::const_error! 2024-11-26 18:38:24 +01:00
Josh Stone
f4d9d1a0ea Use &raw in the standard library
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-25 17:03:20 -07:00
Michael Goulet
c682aa162b Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
Nicholas Nethercote
70fcf9e790 Insert some blank lines.
After things that are immediately followed by a `use` declaration and
look like they might apply to that `use` item but actually don't.
2024-07-30 07:25:15 +10:00
Nicholas Nethercote
84ac80f192 Reformat use declarations.
The previous commit updated `rustfmt.toml` appropriately. This commit is
the outcome of running `x fmt --all` with the new formatting options.
2024-07-29 08:26:52 +10:00
Chris Denton
fae6037884 Windows: move BSD socket shims to netc 2024-07-15 12:34:31 +00:00
Jubilee
476d399782 Rollup merge of #127750 - ChrisDenton:safe-unsafe-unsafe, r=workingjubilee
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-15 02:28:44 -07:00
Chris Denton
2402e84e78 Make pal/windows default to deny unsafe in unsafe 2024-07-15 07:00:40 +00:00
Chris Denton
e2b062c9b5 Remove DWORD 2024-07-15 05:01:22 +00:00
Benoît du Garreau
9c64068ddb Factor some common io::Error constants 2024-04-11 09:55:15 +02:00
Pavel Grigorenko
ff187a92d8 library: use addr_of! 2024-02-24 16:02:17 +03:00
Benoît du Garreau
0a42a540c6 Make io::BorrowedCursor::advance safe
This also keeps the old `advance` method under `advance_unchecked` name.

This makes pattern like `std::io::default_read_buf` safe to write.
2024-02-07 16:46:28 +01:00
joboet
7c436a8af4 update paths in comments 2024-01-12 00:11:33 +01:00
joboet
99128b7e45 std: begin moving platform support modules into pal 2024-01-11 20:10:25 +01:00