-
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 14 pull requests #89512
Rollup of 14 pull requests #89512
Conversation
These structs have misleading names. An ExitStatus[Error] is actually a Unix wait status; an ExitCode is actually an exit status. The Display impls are fixed, but the Debug impls are still misleading, as reported in rust-lang#74832. Fix this by pretending that these internal structs are called `unix_exit_status` and `unix_wait_status` as applicable. (We can't actually rename the structs because of the way that the cross-platform machinery works: the names are cross-platform.) Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
This also makes `<[T; N]>::as_slice` const due to its trivial nature.
namely `Vec::extend_from_within`
fix: move test that require mut to another Adding TODOs for Option::take and Option::copied TODO to FIXME + moving const stability under normal Moving const stability attr under normal stab attr move more rustc stability attributes
For some reason unboxed_closures supresses the feature gate for min_specialization when implementing TrustedStep. min_specialization is the true feature that is used.
On MinGW toolchains the various features (such as function sections) necessary to eliminate dead function references are disabled due to various bugs. This means that the windows sockets library will most likely remain linked to any mingw toolchain built program that also utilizes libstd. That said, I made an attempt to also enable `function-sections` and `--gc-sections` during my experiments, but the symbol references remained, sadly.
This is cleaner and removes an unstable feature usage
…plett Add `Ipv6Addr::is_benchmarking` This PR adds the unstable method `Ipv6Addr::is_benchmarking`. This method is added for parity with `Ipv4Addr::is_benchmarking`, and I intend to use it in a future rework of `Ipv6Addr::is_global` (edit: rust-lang#86634) to more accurately follow the [IANA Special Address Registry](https://www.iana.org/assignments/iana-ipv6-special-registry/iana-ipv6-special-registry.xhtml) (like is done in `Ipv4Addr::is_global`). With `Ipv6Addr::is_benchmarking` and `Ipv4Addr::is_benchmarking` now both existing, `IpAddr::is_benchmarking` is also added.
…-replace, r=joshtriplett const fn for option copied, take & replace Tracking issue: [rust-lang#67441](rust-lang#67441) Adding const fn for the copied, take and replace method of Option. Also adding necessary unit test. It's my first contribution so I am pretty sure I don't know what I'm doing but there's a first for everything!
BTree: refine some comments
…metics_as_const, r=joshtriplett Mark unsafe methods NonZero*::unchecked_(add|mul) as const. Now that rust-lang/rfcs#3016 has landed, these two unstable `std` function can be marked `const`, according to this detail of rust-lang#84186.
…block-std, r=dtolnay Remove unnecessary unsafe block in `process_unix` Because it's nested under this unsafe fn! This block isn't detected as unnecessary because of a bug in the compiler: rust-lang#88260.
Manual Debug for Unix ExitCode ExitStatus ExitStatusError These structs have misleading names. An ExitStatus[Error] is actually a Unix wait status; an ExitCode is actually an exit status. These misleading names appear in the `Debug` output. The `Display` impls on Unix have been improved, but the `Debug` impls are still misleading, as reported in rust-lang#74832. Fix this by pretending that these internal structs are called `unix_exit_status` and `unix_wait_status` as applicable. (We can't actually rename the structs because of the way that the cross-platform machinery works: the names are cross-platform.) After this change, this program ``` #![feature(exit_status_error)] fn main(){ let x = std::process::Command::new("false").status().unwrap(); dbg!(x.exit_ok()); eprintln!("x={:?}",x); } ``` produces this output ``` [src/main.rs:4] x.exit_ok() = Err( ExitStatusError( unix_wait_status( 256, ), ), ) x=ExitStatus(unix_wait_status(256)) ``` Closes rust-lang#74832
…oshtriplett Partially stabilize `array_methods` This stabilizes `<[T; N]>::as_slice` and `<[T; N]>::as_mut_slice`, which is forms part of the `array_methods` feature: rust-lang#76118. This also makes `<[T; N]>::as_slice` const due to its trivial nature.
Add missing `# Panics` section to `Vec` method namely `Vec::extend_from_within`
…llot Remove some feature gates The first commit removes various feature gates that are unused. The second commit replaces some `Fn` implementations with `Iterator` implementations, which is much cleaner IMO. The third commit replaces an unboxed_closures feature gate with min_specialization. For some reason the unboxed_closures feature gate suppresses the min_specialization feature gate from triggering on an `TrustedStep` impl. The last comment just turns a regular comment into a doc comment as drive by cleanup. I can move it to a separate PR if preferred.
Fix link in Ipv6Addr::to_ipv4 docs
Add truncate note to Vec::resize A very minor addition to the `Vec::resize` documentation to point out the `truncate` method. When I was searching for something matching `truncate` I managed to miss it, along with some colleagues. We later found it by chance. We did find `resize` however, so I was hoping to point it out in the documentation.
Fix typos in rustdoc/lints This PR merely fixes a few typos in a recently introduced change :) Refs: rust-lang#85223
Only register `WSACleanup` if `WSAStartup` is actually ever called See rust-lang#85595 Fixes rust-lang#85441
…mulacrum Add regression test for spurious const error with NLL Fixes rust-lang#55825
@bors r+ p=5 |
📌 Commit 5c5dde8 has been approved by |
☀️ Test successful - checks-actions |
Finished benchmarking commit (44593ae): comparison url. Summary: This change led to large relevant improvements 🎉 in compiler performance.
If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. @rustbot label: -perf-regression |
Successful merges:
Ipv6Addr::is_benchmarking
#86434 (AddIpv6Addr::is_benchmarking
)process_unix
#88286 (Remove unnecessary unsafe block inprocess_unix
)array_methods
#88353 (Partially stabilizearray_methods
)# Panics
section toVec
method #88370 (Add missing# Panics
section toVec
method)WSACleanup
ifWSAStartup
is actually ever called #89472 (Only registerWSACleanup
ifWSAStartup
is actually ever called)Failed merges:
r? @ghost
@rustbot modify labels: rollup
Create a similar rollup