-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rollup of 3 pull requests #127757
Rollup of 3 pull requests #127757
Conversation
This provides a list of locations to hunt down issues in.
We stick to C types in for socket and address as these are at least nominally BSD-ish and they're used outside of pal/windows in general *nix code
As with USHORT, keep using C types for BSD socket APIs.
…bilee Windows: Remove some unnecessary type aliases Back in the olden days, C did not have fixed-width types so these type aliases were at least potentially useful. Nowadays, and especially in Rust, we don't need the aliases and they don't help with anything. Notably the windows bindings we use also don't bother with the aliases. And even when we have used aliases they're often only used once then forgotten about. The only one that gives me pause is `DWORD` because it's used a fair bit. But it's still used inconsistently and we implicitly assume it's a `u32` anyway (e.g. `as` casting from an `i32`).
…td, r=jhpratt std: `#![deny(unsafe_op_in_unsafe_fn)]` in platform-independent code This applies the `unsafe_op_in_unsafe_fn` lint in all places in std that _do not have platform-specific cfg in their code_. For all such places, the lint remains allowed, because they need further work to address the relevant concerns. This list includes: - `std::backtrace_rs` (internal-only) - `std::sys` (internal-only) - `std::os` Notably this eliminates all "unwrapped" unsafe operations in `std::io` and `std::sync`, which will make them much more auditable in the future. Such has *also* been left for future work. While I made a few safety comments along the way on interfaces I have grown sufficiently familiar with, in most cases I had no context, nor particular confidence the unsafety was correct. In the cases where I was able to determine the unsafety was correct without having prior context, it was obviously redundant. For example, an unsafe function calling another unsafe function that has the exact same contract, forwarding its caller's requirements just as it forwards its actual call.
…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 rust-lang#127747 but it should help prevent regressions until that is done and also make it more obvious specifically which modules need attention.
@bors r+ rollup=never p=3 |
☀️ Test successful - checks-actions |
📌 Perf builds for each rolled up PR:
previous master: adeb79d3f5 In the case of a perf regression, run the following command for each PR you suspect might be the cause: |
Finished benchmarking commit (d3dd34a): comparison URL. Overall result: ❌✅ regressions and improvements - no action needed@rustbot label: -perf-regression Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)Results (primary 5.5%, secondary 0.1%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResults (secondary 2.7%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Binary sizeResults (primary -0.0%, secondary -0.0%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Bootstrap: 700.232s -> 700.525s (0.04%) |
Successful merges:
#![deny(unsafe_op_in_unsafe_fn)]
in platform-independent code #127744 (std:#![deny(unsafe_op_in_unsafe_fn)]
in platform-independent code)#![deny(unsafe_op_in_unsafe_fn)]
#127750 (Make os/windows and pal/windows default to#![deny(unsafe_op_in_unsafe_fn)]
)r? @ghost
@rustbot modify labels: rollup
Create a similar rollup