Rollup of 8 pull requests#158145
Open
JonathanBrouwer wants to merge 24 commits into
Open
Conversation
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
Contributor
Author
Contributor
Contributor
|
⌛ Trying commit 2c5fdb9 with merge 4de4cb7… To cancel the try build, run the command Workflow: https://github.com/rust-lang/rust/actions/runs/27840501056 |
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
Contributor
|
⌛ Testing commit 2c5fdb9 with merge f428d12... Workflow: https://github.com/rust-lang/rust/actions/runs/27841753362 |
rust-bors Bot
pushed a commit
that referenced
this pull request
Jun 19, 2026
…uwer Rollup of 8 pull requests Successful merges: - #158129 (ensure the new solver bootstraps on CI) - #158134 (Rename `lint-rust-version` to `hint-msrv`) - #157926 (Implement `#[diagnostic::on_unknown]` for modules.) - #158075 (Point to the unstable segment of an import path instead of to the whole path) - #158084 (`-Znext-solver` Emit error instead of ICE when combining {int, float} var with alias) - #158128 (std: use correct low surrogate range in Windows standard I/O code) - #158132 (std: correctly report file size on UWP) - #158138 (Remove redundant check for `#[loop_match]` and `#[const_continue]`)
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:
lint-rust-versiontohint-msrv#158134 (Renamelint-rust-versiontohint-msrv)#[diagnostic::on_unknown]for modules. #157926 (Implement#[diagnostic::on_unknown]for modules.)-Znext-solverEmit error instead of ICE when combining {int, float} var with alias #158084 (-Znext-solverEmit error instead of ICE when combining {int, float} var with alias)#[loop_match]and#[const_continue]#158138 (Remove redundant check for#[loop_match]and#[const_continue])r? @ghost
Create a similar rollup