Skip to content

Rollup of 8 pull requests#158145

Merged
rust-bors[bot] merged 24 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-89qzt8B
Jun 19, 2026
Merged

Rollup of 8 pull requests#158145
rust-bors[bot] merged 24 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-89qzt8B

Conversation

@JonathanBrouwer

Copy link
Copy Markdown
Contributor

Successful merges:

r? @ghost

Create a similar rollup

mejrs and others added 24 commits June 17, 2026 09:55
remove `check_loop_match` from `check_attr.rs` as it only verifies
that the target is a loop, which is already enforced by `check_target`
in `target_checking.rs` via `ALLOWED_TARGETS`, and its `LoopMatchAttr`
diagnostic.
remove `check_const_continue` from `check_attr.rs` as it only verifies
that the target is a break, which is already enforced by `check_target`
in `target_checking.rs` via `ALLOWED_TARGETS`, and it's's
`ConstContinueAttr` diagnostic.
ensure the new solver bootstraps on CI

With rust-lang#158040, the new solver should now be able to bootstrap, and this PR ensures on CI it doesn't regress. This is part of the plan in rust-lang#157780 until stabilization.

This renames the job as well to something hopefully clearer, from `x86_64-gnu-pre-stabilization` to `x86_64-gnu-next-trait-solver-polonius`. And thus, also needs rust-lang/rustc-dev-guide#2904 to have the correct `doc_url`.

r? kobzol
…thanBrouwer

Rename `lint-rust-version` to `hint-msrv`

As suggested here: rust-lang#157574 (comment). I agree that this version is more clear about semantics, and reflects the consensus of the previous MCP.

Tracking issue: rust-lang#157574
…enkov

Implement `#[diagnostic::on_unknown]` for modules.

This lets you customize the error message if an item can't be found in a module. Primarily my motivation for this is that I was trying to dogfood `diagnostic::on_unknown` in my own crates and realized I was writing a lot of duplicate attributes and it'd be simpler if it just applied to things at a module level.

For example:
```rust
#[diagnostic::on_unknown(message = "oh no, `{Unresolved}` is not in module `{This}`")]
pub mod x {
    pub struct Foo;
}

pub use x::Bar;
```
```
error[E0432]: oh no, `Bar` is not in module `x`
  --> $DIR/on_module.rs:9:9
   |
LL | pub use x::Bar;
   |         ^^^---
   |            |
   |            no `Bar` in `x`
   |
   = note: unresolved import `x::Bar`
```
Also, as shown, this implements `{Unresolved}` to reference whatever couldn't be found.

Inner attribute syntax (`#![diagnostic::on_unknown]`) is supported, however it (still) is an error to use inner tool attributes without `#![feature(custom_inner_attributes)]`.

cc @estebank @weiznich
Point to the unstable segment of an import path instead of to the whole path

Brought to you by me being confused why a stable item reported an instability error.
`-Znext-solver` Emit error instead of ICE when combining {int, float} var with alias

Fixes rust-lang#158064

r? lcnr
…risDenton

std: use correct low surrogate range in Windows standard I/O code

SebTardif#377 is an LLM-generated issue where the LLM managed to find a wrong constant in `std`. Low surrogates do indeed start at `0xDC00`, not `0xDCEE`.

This is kind of hard to test for, maybe you have ideas Chris?
r? @ChrisDenton
…isDenton

std: correctly report file size on UWP

Found by an LLM in SebTardif#397.

UWP uses [`GetFileInformationByHandleEx`](https://learn.microsoft.com/en-us/windows/desktop/api/winbase/nf-winbase-getfileinformationbyhandleex) instead of [GetFileInformationByHandle](https://learn.microsoft.com/en-us/windows/desktop/api/fileapi/nf-fileapi-getfileinformationbyhandle), but uses the wrong field to determine file size – `EndOfFile` is a different field than `AllocationSize`. [`file_size`](https://doc.rust-lang.org/nightly/std/os/windows/fs/trait.MetadataExt.html#tymethod.file_size) should report the length of the file, not its size on disk, and only `EndOfFile` reports the former (c.f. https://learn.microsoft.com/en-us/windows/win32/api/FileAPI/nf-fileapi-setendoffile#remarks):

> Each file stream has the following:
> * File size: the size of the data in a file, to the byte.
> * Allocation size: the size of the space that is allocated for a file on a disk, which is always an even multiple of the cluster size.
> * Valid data length: the length of the data in a file that is actually written, to the byte. This value is always less than or equal to the file size.

r? @ChrisDenton
…athanBrouwer

Remove redundant check for `#[loop_match]` and `#[const_continue]`

Updates rust-lang#153101

remove `check_loop_match` and `check_const_continue` from `check_attr.rs` as they only verifies that the target, which is already enforced by `check_target` in `target_checking.rs` via `ALLOWED_TARGETS`.

r? @JonathanBrouwer
@rust-bors rust-bors Bot added the rollup A PR which is a rollup label Jun 19, 2026
@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) 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-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jun 19, 2026
@rustbot rustbot added 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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) labels Jun 19, 2026
@JonathanBrouwer

Copy link
Copy Markdown
Contributor Author

@bors r+ rollup=never p=5

Trying commonly failed jobs
@bors try jobs=dist-various-1,test-various,x86_64-gnu-aux,x86_64-gnu-llvm-21-3,x86_64-msvc-1,aarch64-apple,x86_64-mingw-1,i686-msvc-2

@rust-bors

rust-bors Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 2c5fdb9 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 Jun 19, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Jun 19, 2026
Rollup of 8 pull requests


try-job: dist-various-1
try-job: test-various
try-job: x86_64-gnu-aux
try-job: x86_64-gnu-llvm-21-3
try-job: x86_64-msvc-1
try-job: aarch64-apple
try-job: x86_64-mingw-1
try-job: i686-msvc-2
@rust-bors

This comment has been minimized.

@jhpratt

jhpratt commented Jun 19, 2026

Copy link
Copy Markdown
Member

@bors treeclosed-

@rust-bors

rust-bors Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Tree is now open for merging.

@rust-bors

rust-bors Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: 4de4cb7 (4de4cb7c8d09700e0ba6bbd196e22a7c537b76ee)
Base parent: 0c1748c (0c1748ce7c56091b659757e488dbaf782b814137)

@rust-bors rust-bors Bot added merged-by-bors This PR was explicitly merged by bors. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jun 19, 2026
@rust-bors

rust-bors Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

☀️ Test successful - CI
Approved by: JonathanBrouwer
Duration: 3h 11m 5s
Pushing f428d12 to main...

@rust-bors rust-bors Bot merged commit f428d12 into rust-lang:main Jun 19, 2026
15 checks passed
@rustbot rustbot added this to the 1.98.0 milestone Jun 19, 2026
@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

A job failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
Parent: d80660864fab37b060d052e01fd3ec40e4d33d11
HEAD: f428d123ab0ea5431ec4256ff8838b9342866446 (#158145)
    Updating crates.io index
error: failed to get `adler2` as a dependency of package `miniz_oxide v0.8.8`
    ... which satisfies dependency `miniz_oxide = "^0.8.5"` of package `flate2 v1.1.9`
    ... which satisfies dependency `flate2 = "^1.1.9"` of package `citool v0.1.0 (/home/runner/work/rust/rust/src/ci/citool)`

Caused by:
  failed to load source for dependency `adler2`

Caused by:
  unable to update registry `crates-io`

Caused by:
  download of ad/le/adler2 failed

Caused by:
  curl failed

Caused by:

@rust-timer

Copy link
Copy Markdown
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#157926 Implement #[diagnostic::on_unknown] for modules. 061eea5751f98932b66c302a9ab622bd23080fa3 (link)
#158075 Point to the unstable segment of an import path instead of … 08affa9a2062264cc5b2b198c45052f92005aaa3 (link)
#158084 -Znext-solver Emit error instead of ICE when combining {i… fda8d51cefeba0a600c7609d00105a0b9402ce7a (link)
#158128 std: use correct low surrogate range in Windows standard I/… 7bfcd909d06a402e30982f60e3e45b2fcf76cd65 (link)
#158129 ensure the new solver bootstraps on CI 77897976423a850ccee3891d342f0c89e384ef40 (link)
#158132 std: correctly report file size on UWP 7bc77b5400f108943e76eda7cc55e81996566b4f (link)
#158134 Rename lint-rust-version to hint-msrv f66b1b0d10863a74a6b3f8109336e5ee5ad89b9e (link)
#158138 Remove redundant check for #[loop_match] and `#[const_con… cf6f8a054ce7e287bd07a3d30f8f7daf7db0e8e5 (link)

previous master: d80660864f

In the case of a perf regression, run the following command for each PR you suspect might be the cause: @rust-timer build $SHA

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (f428d12): comparison URL.

Overall result: ❌ regressions - please read:

Our benchmarks found a performance regression caused by this PR.
This might be an actual regression, but it can also be just noise.

Next Steps:

  • If the regression was expected or you think it can be justified,
    please write a comment with sufficient written justification, and add
    @rustbot label: +perf-regression-triaged to it, to mark the regression as triaged.
  • If you think that you know of a way to resolve the regression, try to create
    a new PR with a fix for the regression.
  • If you do not understand the regression or you think that it is just noise,
    you can ask the @rust-lang/wg-compiler-performance working group for help (members of this group
    were already notified of this PR).

@rustbot label: +perf-regression
cc @rust-lang/wg-compiler-performance

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
0.6% [0.2%, 1.6%] 10
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-1.1% [-1.1%, -1.1%] 1
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results (primary -2.4%, secondary 3.0%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
3.0% [2.4%, 3.6%] 2
Improvements ✅
(primary)
-2.4% [-2.4%, -2.4%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -2.4% [-2.4%, -2.4%] 1

Cycles

Results (primary 4.9%, secondary 5.1%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
4.9% [2.0%, 24.5%] 42
Regressions ❌
(secondary)
5.1% [2.3%, 20.5%] 16
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 4.9% [2.0%, 24.5%] 42

Binary size

This perf run didn't have relevant results for this metric.

Bootstrap: 481.965s -> 482.643s (0.14%)
Artifact size: 390.67 MiB -> 391.20 MiB (0.14%)

@rustbot rustbot added the perf-regression Performance regression. label Jun 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-attributes Area: Attributes (`#[…]`, `#![…]`) A-CI Area: Our Github Actions CI A-testsuite Area: The testsuite used to check the correctness of rustc merged-by-bors This PR was explicitly merged by bors. perf-regression Performance regression. rollup A PR which is a rollup 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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver)

Projects

None yet

Development

Successfully merging this pull request may close these issues.