Rollup of 10 pull requests - #162622
Conversation
when the hidden type of an opaque was never constrained, typeck reported E0282 with only the shared cannot infer type label. nothing in the output said an opaque was involved, so the error read like an ordinary local inference failure. the unconstrained hidden type arm now adds a note naming the opaque as the source of the ambiguity. fixes rust-lang#146231
Configure the LoongArch64 Linux targets to place read-only code in the first LOAD segment when linking with LLD, mold, and other GNU-compatible linkers. This keeps the segment layout consistent with GNU ld and allows Linux to make better use of file-backed PMD mappings, reducing iTLB misses.
This mirrors the existing default for x86_64-unknown-linux-gnu, but is gated to the nightly channel only, since it needs some soak time to catch any regressions before rolling it out to beta and stable.
Explain the byte alphabet, padding, definition markers, and empty layouts. Cover surviving and fully pruned alternatives, including nested sequences, and replace obsolete visibility terminology. Validation: ./x test compiler/rustc_transmute Agent-Authored-By: AI agent acting on Josh Liebow-Feeser's behalf
Describe the query stages and deferred obligations, correct stale comments, and exercise both validity settings in the powerset test. Add direct checks for condition grouping, error selection, and quantifier short-circuiting. Document the existing conditional behavior of Answer::or without changing it. Validation: ./x test compiler/rustc_transmute Agent-Authored-By: AI agent acting on Josh Liebow-Feeser's behalf
Specify interval-union inputs and output partitions and test overlaps, boundaries, and coalescing. Mark DOT entry and accepting states distinctly, log full graphs once per query, and omit the memoization cache from spans. Validation: ./x test compiler/rustc_transmute A manual bool identity query with RUSTC_LOG=rustc_transmute=debug confirmed one source graph, one destination graph, and no cache dumps. Agent-Authored-By: AI agent acting on Josh Liebow-Feeser's behalf
Use each YawningVoid type as a destination in its UI test instead of repeating the zero-sized Void case. Equal-sized u128 sources prevent a size mismatch from masking a failure to reject an uninhabited destination. Update the copied explanations and regenerate the diagnostic snapshot. Validation: ./x test tests/ui/transmutability Agent-Authored-By: AI agent acting on Josh Liebow-Feeser's behalf
…quiered for clippy analysis)
These are dead since the old emitter was removed in Jan 2026 (3ccabc6). Also removed: `BRIGHT_BLUE`, `Level::color`, and a couple of `level` fn parameters.
It has a single use, where it is passed in to `format_diag_messages` which then discards it. So that use can be replaced with `Style::NoStyle`.
`format_diag_messages` always constructs a `String`, so it can just return that. This simplifies various call sites.
When there's a single message, `format_diag_message` suffices.
Use the `FatalError` re-export from `rustc_errors` instead of `rustc_span`, because that's what's normally done.
Currently `Level` is used for both diagnostics and subdiagnostics. But both diagnostics and subdiagnostics only use some of the levels. This commit introduces `Sublevel` to tighten up the representation and prevent impossible combinations.
Mingw used to have an incorrect import library for the synchronization functions `WaitOnAddress`, `WakeByAddressSingle` and `WakeByAddressAll`. This was fixed a long time ago and our windows-gnu targets require a much newer mingw in any case.
item_name fix Co-authored-by: Bruno Kolenbrander <59372212+mejrs@users.noreply.github.com>
Update `windows-bindgen` to 0.100.0 This release represents a major change in the way bindings are generated. See microsoft/windows-rs#4867 for details. In short, it now more directly follows the C headers. For the standard library's purposes this is mostly reflected in relatively minor type changes or with some `const` pointers becoming `mut`. There is however one big change that affects a lot of types. In the headers there are a lot of `#define`s like this: ```c #define GENERIC_READ (0x80000000L) #define GENERIC_WRITE (0x40000000L) ``` These are constants for the access mode. In this case they're explicitly declared as `L` (aka signed long) integer types (in other cases there's no type at all). However, this conflicts with how access mode constants are actually used. E.g., see `CreateFileW`: ```c WINBASEAPI HANDLE WINAPI CreateFileW( _In_ LPCWSTR lpFileName, _In_ DWORD dwDesiredAccess, _In_ DWORD dwShareMode, _In_opt_ LPSECURITY_ATTRIBUTES lpSecurityAttributes, _In_ DWORD dwCreationDisposition, _In_ DWORD dwFlagsAndAttributes, _In_opt_ HANDLE hTemplateFile ); ``` Here `dwDesiredAccess` is a `DWORD`, which in rust equates to `u32`. The constant being signed but the usage being unsigned is not a problem for C/C++. They will happily convert between types at the drop of a hat. Rust however is stricter, as you know. The old metadata used by `windows-bindgen` tried to try to fixup this mismatch but the new one goes strictly by what can be inferred from the headers. The hope in the future is that the headers themselves will be updated so better bindings can be directly derived from them.
Revert "Rollup merge of rust-lang#157518 - CAD97:xdg_basedir, r=aapoalas" This reverts commit ac80064, reversing changes made to 8d6b380. <!-- homu-ignore:start --> - rust-lang#157515 is superseded - This includes just the revert that's the first commit in rust-lang#158936
Basic cleanup in `rustc_transmute` The content of this PR was authored by an LLM. r? @jswrenn
…lone-diagnostic-test, r=jieyouxu Add test for the missing Clone requirement for Cow slices Fixes rust-lang#141241
…erence-note, r=chenyukang mention the opaque when its hidden type cannot be inferred when the hidden type of an opaque was never constrained, typeck reported `E0282` with only the shared cannot infer type label. nothing in the output said an opaque was involved, so the error read like an ordinary local inference failure. the unconstrained hidden type arm now adds a note naming the opaque as the source of the ambiguity. fixes rust-lang#146231 r? @lcnr
…r=oli-obk Simplify diagnostic levels This PR separates diagnostic levels from subdiagnostic levels and does a few preliminary cleanups. Details in individual commits. r? @oli-obk
…chenyukang Use lld by default on `loongarch64-unknown-linux-gnu` nightly This PR makes LLD the default linker for `loongarch64-unknown-linux-gnu` on nightly. As a prerequisite, it aligns the LoongArch64 Linux `LOAD` segment layout of LLD and other GNU-compatible linkers with GNU ld. This keeps the layout consistent and allows Linux to make better use of file-backed PMD mappings. The LLD default is initially limited to nightly to allow some soak time before rolling it out to beta and stable. To opt out of using LLD, `RUSTFLAGS="-Clinker-features=-lld"` would be used. To opt out of using rust-lld, falling back to the LLD installed on the system, `RUSTFLAGS="-Clink-self-contained=-linker"` would be used.
yeet StabilityLevel It is unused.
…tems, r=mejrs iter::repeat_with, iter::successors, iter::from_fn added as diagnostic items added iter::repeat_with, iter::successors, iter::from_fn as diagnostic items, in order for clippy to be able to register them and work with them. Link to clippy issue: rust-lang/rust-clippy#17719
…-test, r=chenyukang regression test for async main diagnostic Closes rust-lang#78905
|
@bors r+ p=5 |
This comment has been minimized.
This comment has been minimized.
What is this?This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.Comparing 9e9544d (parent) -> a59b87a (this PR) Test differencesShow 118 test diffsStage 0
Stage 1
Stage 2
Additionally, 32 doctest diffs were found. These are ignored, as they are noisy. Job group index
Test dashboardRun cargo run --manifest-path src/ci/citool/Cargo.toml -- \
test-dashboard a59b87ab9929f0361031e0d0080a9bf2ea4cdbc0 --output-dir test-dashboardAnd then open Job duration changes
How to interpret the job duration changes?Job durations can vary a lot, based on the actual runner instance |
|
📌 Perf builds for each rolled up PR:
parent commit: 9e9544da4c In the case of a perf regression, run the following command for each PR you suspect might be the cause: |
|
Finished benchmarking commit (a59b87a): comparison URL. Overall result: ✅ improvements - no action needed@rustbot label: -perf-regression Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (primary -0.4%, secondary -0.8%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary -0.2%, secondary -0.4%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeResults (primary -0.0%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Bootstrap: 478.978s -> 479.056s (0.02%) |
Successful merges:
windows-bindgento 0.100.0 #162270 (Updatewindows-bindgento 0.100.0)rustc_transmute#162607 (Basic cleanup inrustc_transmute)loongarch64-unknown-linux-gnunightly #162546 (Use lld by default onloongarch64-unknown-linux-gnunightly)r? @ghost
Create a similar rollup