Skip to content

Rollup of 12 pull requests#154083

Closed
JonathanBrouwer wants to merge 34 commits intorust-lang:mainfrom
JonathanBrouwer:rollup-mdOkZ8f
Closed

Rollup of 12 pull requests#154083
JonathanBrouwer wants to merge 34 commits intorust-lang:mainfrom
JonathanBrouwer:rollup-mdOkZ8f

Conversation

@JonathanBrouwer
Copy link
Contributor

Successful merges:

r? @ghost

Create a similar rollup

mati865 and others added 30 commits February 19, 2026 22:25
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.
@rust-bors rust-bors bot added the rollup A PR which is a rollup label Mar 19, 2026
@rustbot rustbot added A-CI Area: Our Github Actions CI A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Mar 19, 2026
@JonathanBrouwer
Copy link
Contributor Author

@bors r+ rollup=never p=5
Doing two rollups in a row because there's only one rollup=never PR and there are a ton of rollupable ones

@rust-bors
Copy link
Contributor

rust-bors bot commented Mar 19, 2026

📌 Commit 7cc8bd7 has been approved by JonathanBrouwer

It is now in the queue for this repository.

@rust-bors rust-bors bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 19, 2026
@rust-bors

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)
@rust-bors rust-bors bot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Mar 19, 2026
@rust-bors
Copy link
Contributor

rust-bors bot commented Mar 19, 2026

💔 Test for 9ec85bc failed: CI. Failed job:

@JonathanBrouwer
Copy link
Contributor Author

??? github...
@bors retry

@rust-bors rust-bors bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 19, 2026
@rust-log-analyzer
Copy link
Collaborator

The job aarch64-gnu-llvm-21-1 failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
   Compiling rustc_resolve v0.0.0 (/checkout/compiler/rustc_resolve)
[RUSTC-TIMING] rustc_ast_lowering test:false 17.291
   Compiling rustc_public_bridge v0.0.0 (/checkout/compiler/rustc_public_bridge)

Session terminated, killing shell...::group::Clock drift check
  local time: Thu Mar 19 10:47:17 UTC 2026
##[error]The runner has received a shutdown signal. This can happen when the runner service is stopped, or a manually started runner is canceled.
  network time: Thu, 19 Mar 2026 10:47:18 GMT
##[endgroup]
 ...killed.

@rust-bors rust-bors bot added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Mar 19, 2026
@rust-bors
Copy link
Contributor

rust-bors bot commented Mar 19, 2026

This pull request was unapproved due to being closed.

@rust-bors rust-bors bot removed the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Mar 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-CI Area: Our Github Actions CI A-testsuite Area: The testsuite used to check the correctness of rustc rollup A PR which is a rollup S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.