Conversation
It relies on the Option::unwrap function which is not const-stable (yet).
Signed-off-by: cui fliter <imcusg@gmail.com>
…dr, r=joshtriplett Move `unix_socket_abstract` feature API to `SocketAddrExt`. The pre-stabilized API for abstract socket addresses exposes methods on `SocketAddr` that are only enabled for `cfg(any(target_os = "android", target_os = "linux"))`. Per discussion in <rust-lang#85410>, moving these methods to an OS-specific extension trait is required before stabilization can be considered. This PR makes four changes: 1. The internal module `std::os::net` contains logic for the unstable feature `tcp_quickack` (rust-lang#96256). I moved that code into `linux_ext/tcp.rs` and tried to adjust the module tree so it could accommodate a second unstable feature there. 2. Moves the public API out of `impl SocketAddr`, into `impl SocketAddrExt for SocketAddr` (the headline change). 3. The existing function names and docs for `unix_socket_abstract` refer to addresses as being created from abstract namespaces, but a more accurate description is that they create sockets in *the* abstract namespace. I adjusted the function signatures correspondingly and tried to update the docs to be clearer. 4. I also tweaked `from_abstract_name` so it takes an `AsRef<[u8]>` instead of `&[u8]`, allowing `b""` literals to be passed directly. Issues: 1. The public module `std::os::linux::net` is marked as part of `tcp_quickack`. I couldn't figure out how to mark a module as being part of two unstable features, so I just left the existing attributes in place. My hope is that this will be fixed as a side-effect of stabilizing either feature.
…, r=joshtriplett
Stabilize const char convert
Split out `const_char_from_u32_unchecked` from `const_char_convert` and stabilize the rest, i.e. stabilize the following functions:
```Rust
impl char {
pub const fn from_u32(self, i: u32) -> Option<char>;
pub const fn from_digit(self, num: u32, radix: u32) -> Option<char>;
pub const fn to_digit(self, radix: u32) -> Option<u32>;
}
// Available through core::char and std::char
mod char {
pub const fn from_u32(i: u32) -> Option<char>;
pub const fn from_digit(num: u32, radix: u32) -> Option<char>;
}
```
And put the following under the `from_u32_unchecked` const stability gate as it needs `Option::unwrap` which isn't const-stable (yet):
```Rust
impl char {
pub const unsafe fn from_u32_unchecked(i: u32) -> char;
}
// Available through core::char and std::char
mod char {
pub const unsafe fn from_u32_unchecked(i: u32) -> char;
}
```
cc the tracking issue rust-lang#89259 (which I'd like to keep open for `const_char_from_u32_unchecked`).
…s, r=estebank Recover from function pointer types with generic parameter list Give a more helpful error when encountering function pointer types with a generic parameter list like `fn<'a>(&'a str) -> bool` or `fn<T>(T) -> T` and suggest moving lifetime parameters to a `for<>` parameter list. I've added a bunch of extra code to properly handle (unlikely?) corner cases like `for<'a> fn<'b>()` (where there already exists a `for<>` parameter list) correctly suggesting `for<'a, 'b> fn()` (merging the lists). If you deem this useless, I can simplify the code by suggesting nothing at all in this case. I am quite open to suggestions regarding the wording of the diagnostic messages. Fixes rust-lang#103487. ``@rustbot`` label A-diagnostics r? diagnostics
… r=davidtwco Don't print full paths in overlap errors We don't print the full path in other diagnostics -- I don't think it particularly helps with the error message. I also delayed the printing until actually needing to render the error message. r? diagnostics
…ir-build, r=davidtwco Don't ICE with inline const errors during MIR build Fixes rust-lang#104277
…ou-se Fixed some `_i32` notation in `maybe_uninit`’s doc This PR just changed two lines in the documentation for `MaybeUninit`: ```rs let val = 0x12345678i32; ``` was changed to: ```rs let val = 0x12345678_i32; ``` in two doctests, making the values a tad easier to read. It does not seem like there are other literals needing this change in the file.
fix some typos in comments
Fix x finding Python on Windows
`x` searches through the path for `{dir}/python{2|3}?`, but this fails on Windows because the appropriate path is `{dir}/python.exe`.
This PR adds the expected `.exe` extension on Windows while searching.
…=oli-obk interpret: make check_mplace public This helps avoid code duplication in rust-lang/miri#2661.
…omez rustdoc: Resolve doc links in external traits having local impls For external impls it was done in rust-lang#103192 right away, but the local impl case was forgotten. Fixes rust-lang#104145.
Bump chalk to v0.87 1. Removes `ReEmpty` from chalk 2. Adds support for the `std::marker::Tuple` trait
|
@bors r+ rollup=never p=11 |
|
⌛ Testing commit c389097 with merge 7fce8917390c5b33ef41dcd47b417fbc2043dbe8... |
|
The job Click to see the possible cause of the failure (guessed by this bot) |
|
☀️ Test successful - checks-actions |
|
📌 Perf builds for each rolled up PR: previous master: dedfb9c214 In the case of a perf regression, run the following command for each PR you suspect might be the cause: |
|
Finished benchmarking commit (101e182): comparison URL. Overall result: ✅ 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)ResultsThis 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.
CyclesResultsThis 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.
|
Successful merges:
unix_socket_abstractfeature API toSocketAddrExt. #101967 (Moveunix_socket_abstractfeature API toSocketAddrExt.)_i32notation inmaybe_uninit’s doc #104332 (Fixed some_i32notation inmaybe_uninit’s doc)Failed merges:
r? @ghost
@rustbot modify labels: rollup
Create a similar rollup