Rollup of 12 pull requests#154083
Closed
JonathanBrouwer wants to merge 34 commits intorust-lang:mainfrom
Closed
Conversation
Because rustc doesn't handle split debuginfo for these targets, enabling that option causes them to be missing some of the debuginfo.
Ubuntu 26.04 has `llvm-22` packages that we can test with. The `Dockerfile` is otherwise the same as the `llvm-21` runners.
Match the other derive macros in the module (Ord, PartialEq, PartialOrd) by linking to the section in the trait documentation about how the derive macro works.
This is more consistent with what the trait is called elsewhere in tree (specifically compiler-builtins and test-float-parse).
`RawFloat` is currently used specifically for the implementation of the lemire algorithm, but it is useful for more than that. Split it into three different traits: * `Float`: Anything that is reasonably applicable to all floating point types. * `FloatExt`: Items that should be part of `Float` but don't work for all float types. This will eventually be merged back into `Float`. * `Lemire`: Items that are specific to the Lemire algorithm.
`Float` and `FloatExt` are already used by both parsing and printing, so move them out of `dec2flt` to a new module in `num::imp`. `Int` `Cast` have the potential to be used more places in the future, so move them there as well. `Lemire` is the only remaining trait; since it is small, move it into the `dec2flt` root. The `fmt::LowerExp` bound is removed from `Float` here since the trait is moving into a module without `#[cfg(not(no_fp_fmt_parse))]` and it isn't implemented with that config (it's not easily possible to add `cfg` attributes to a single supertrait, unfortunately). This isn't a problem since it isn't actually being used.
When calling an fn that returns a return type as a returned expression, point at the return type to explain that it affects the expected type.
```
error[E0308]: mismatched types
--> f56.rs:5:15
|
3 | fn main() {
| - the call expression's return type is influenced by this return type
4 | let a = 0;
5 | ptr::read(&a)
| --------- ^^ expected `*const ()`, found `&{integer}`
| |
| arguments to this function are incorrect
|
= note: expected raw pointer `*const ()`
found reference `&{integer}`
note: function defined here
--> library/core/src/ptr/mod.rs:1681:21
|
1681 | pub const unsafe fn read<T>(src: *const T) -> T {
| ^^^^
```
The compiler is unaware of the restricted range of the input, so it is unable to optimize out the final division and modulus. By doing this manually, we get a nontrivial performance gain.
This is nitpicky, but the lack of a sensible order has been bugging me.
- Within `mod $name`, put all the typedefs together.
- After that:
- First, types definitions and their impls.
- Then the `TyCtxt*` impls, in a sensible order.
- Likewise, put `TyCtxt::at` before the similar methods.
- Also reflow some overly long lines.
- Use `$crate` more consistently. - Add a couple of useful comments. - Remove some unnecessary local variables.
As `maybe_into_query_key`. Partly to use `key` instead of `param`, and also to make the link to the trait more obvious.
…info-in-bootstrap, r=Mark-Simulacrum Do not enable split debuginfo for windows-gnu Because rustc doesn't handle split debuginfo for these targets, enabling that option causes them to be missing some of the debuginfo.
Fix bootstrap rust build failure for vxworks Fixes rust-lang#153332 Starting with VxWorks 25.09, struct stat was updated to use struct timespec instead of time_t for timestamp fields. The following changes were made in libc in the commit [libc](rust-lang/libc#4781). As a result, when performing a bootstrap build with VxWorks ≥ 25.09, libc no longer exposes the fields st_mtime, st_atime, and st_ctime, as they are conditionally compiled in src/vxworks/mod.rs here [libc](https://github.com/rust-lang/libc/blob/56caa81b6b433c49c5704bf0400a02d428cfacda/src/vxworks/mod.rs#L229). This causes the build to fail. For VxWorks versions earlier than 25.09, the build completes successfully without errors. This PR resolves the issue by detecting the WIND_RELEASE_ID environment variable (which is set in the VxWorks build environment) and conditionally guarding the affected functions in the two additional files where the errors originate.
ci: add runners for vanilla LLVM 22 Ubuntu 26.04 has `llvm-22` packages that we can test with. The `Dockerfile` is otherwise the same as the `llvm-21` runners.
…, r=Mark-Simulacrum Add `Wake` diagnostic item for `alloc::task::Wake` The symbol will be defined in Clippy, as Clippy will be the sole user of the diagnostic item so far.
…g, r=dtolnay Optimize 128-bit integer formatting The compiler is unaware of the restricted range of the input, so it is unable to optimize out the final division and modulus. By doing this manually, we get a nontrivial performance gain. r? @dtolnay (copied from dtolnay/itoa#68)
…s, r=Zalathar `define_callbacks` tweaks Details in the individual commits. r? @Zalathar
…mulacrum Split the `dec2flt::RawFloat` trait for easier reuse `RawFloat` is an internal trait with quite a few useful float properties. It currently resides in the `dec2flt` module but is also used in parsing, and would be nice to reuse other places. Unfortunately it cannot be implemented on `f128` because of limitations with how the parsing API is implemented (mantissa must fit into a u64). To make the trait easier to work with, split it into the following: * `Float`: Anything that is reasonably applicable to all floating point types. * `FloatExt`: Items that should be part of `Float` but don't work for all float types. This will eventually be merged back into `Float` once it can be implemented on f128. * `Lemire`: Items that are specific to the Lemire dec2flt algorithm. These traits are then moved to places that make sense. Builds on top of rust-lang#151900
…ted, r=Mark-Simulacrum Add is_disconnected functions to mpsc and mpmc channels Add `is_disconnected()` functions to the `Sender` and `Receiver` of both `mpmc` an `mpsc` channels. ```rust std::sync::mpmc::Sender<T>::is_disconnected(&self) -> bool std::sync::mpmc::Receiver<T>::is_disconnected(&self) -> bool std::sync::mpsc::Sender<T>::is_disconnected(&self) -> bool std::sync::mpsc::Receiver<T>::is_disconnected(&self) -> bool ``` The `mpsc` methods are locked behind the `mpsc_is_disconnected` feature gate, which has no tracking issue yet. ACP: rust-lang/libs-team#748 Tracking issue: rust-lang#153668
…Mark-Simulacrum Derive Macro Eq: link to more detailed documentation Match the other derive macros in the module (Ord, PartialEq, PartialOrd) by linking to the section in the trait documentation about how the derive macro works.
Point at return type when it is the source of the type expectation
When calling an fn that returns a return type as a returned expression, point at the return type to explain that it affects the expected type.
```
error[E0308]: mismatched types
--> f56.rs:5:15
|
3 | fn main() {
| - the call expression's return type is influenced by this return type
4 | let a = 0;
5 | ptr::read(&a)
| --------- ^^ expected `*const ()`, found `&{integer}`
| |
| arguments to this function are incorrect
|
= note: expected raw pointer `*const ()`
found reference `&{integer}`
note: function defined here
--> library/core/src/ptr/mod.rs:1681:21
|
1681 | pub const unsafe fn read<T>(src: *const T) -> T {
| ^^^^
```
Fix rust-lang#43608.
simplify and remove `tests/ui/kindck` and related tests kindck does not exist anymore since a long time now. This PR merges and deletes several redundant tests in that directory, reformats the rest and moves it to `ui/traits`.
…ouxu bootstrap: Allow `--bless`ing changes to editor settings files Previously, on any change you would have to first edit all 4 settings files by hand, then run the tests 4 times in a row to discover what the new hashes are. After this change, you still need to edit the files by hand, but you can now run `x test --bless -- hash` to update the hashes without manually editing them.
Contributor
Author
|
@bors r+ rollup=never p=5 |
Contributor
This comment has been minimized.
This comment has been minimized.
rust-bors bot
pushed a commit
that referenced
this pull request
Mar 19, 2026
…uwer Rollup of 12 pull requests Successful merges: - #152870 (Do not enable split debuginfo for windows-gnu) - #153333 (Fix bootstrap rust build failure for vxworks) - #153681 (ci: add runners for vanilla LLVM 22) - #153824 (Add `Wake` diagnostic item for `alloc::task::Wake`) - #154077 (Optimize 128-bit integer formatting) - #154078 (`define_callbacks` tweaks) - #151905 (Split the `dec2flt::RawFloat` trait for easier reuse) - #153170 (Add is_disconnected functions to mpsc and mpmc channels) - #153804 (Derive Macro Eq: link to more detailed documentation) - #153974 (Point at return type when it is the source of the type expectation) - #154018 (simplify and remove `tests/ui/kindck` and related tests) - #154041 (bootstrap: Allow `--bless`ing changes to editor settings files)
Contributor
|
💔 Test for 9ec85bc failed: CI. Failed job:
|
Contributor
Author
|
??? github... |
Collaborator
|
The job Click to see the possible cause of the failure (guessed by this bot) |
Contributor
|
This pull request was unapproved due to being closed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Successful merges:
Wakediagnostic item foralloc::task::Wake#153824 (AddWakediagnostic item foralloc::task::Wake)define_callbackstweaks #154078 (define_callbackstweaks)dec2flt::RawFloattrait for easier reuse #151905 (Split thedec2flt::RawFloattrait for easier reuse)tests/ui/kindckand related tests #154018 (simplify and removetests/ui/kindckand related tests)--blessing changes to editor settings files #154041 (bootstrap: Allow--blessing changes to editor settings files)r? @ghost
Create a similar rollup