343589 Commits

Author SHA1 Message Date
bors
8a9dd7abdf Auto merge of #164333 - tgross35:update-builtins, r=tgross35
compiler-builtins subtree update

Subtree update of `compiler-builtins` to c8f734e1a0.

Created using https://github.com/rust-lang/josh-sync.

r? @ghost
2026-10-15 06:02:36 +00:00
bors
91e9c2688e Auto merge of #164313 - BoxyUwU:abby_reframe_constraint_storage, r=khyperia
Abby: rename and move solver constraint storage to be constraint data



r? khyperia

cc @adwinwhite

Instead of having a `SolverRegionConstraintStorage` which exists at the top level in `InferCtxtInner` next to legacy handling's `RegionConstraintStorage`, we rename to `SolverRegionConstraintData` and move it into `RegionConstraintStorage` alongside the legacy `RegionConstraintData`.

This more accurately reflects that when we talk about "merging" legacy and abby constraints into one, it means replacing `RegionConstraintsData` with `SolverRegionConstraintsData`, *not* getting rid of everything else in `RegionConstriantStorage` (many of the fields in there are used under abby and will continue to be used).

This cleanup should also make it easier to do future cleanups like making the lub/sub/eq/etc methods actually work correctly under abby instead of silently doing nothing ✨ In theory there shouldn't be any behaviour changes from this PR
2026-10-15 02:44:06 +00:00
Boxy Uwu
f0e16abdb8 make undolog smaller 2026-10-14 23:35:40 +01:00
Boxy Uwu
93ecc7c9ab mark everywhere that needs to handle abby constraints too 2026-10-14 23:35:40 +01:00
Boxy Uwu
c7b158d01d Move abby constraints data into region constraint storage 2026-10-14 23:35:40 +01:00
bors
701ce39ddc Auto merge of #164254 - nikic:llvm-update-4, r=cuviper
Update LLVM submodule

Update LLVM submodule to a newer snapshot of release/23.x. It should resolve the following issues:

https://github.com/rust-lang/rust/issues/164137
https://github.com/rust-lang/rust/issues/163737
https://github.com/rust-lang/rust/issues/163677
https://github.com/rust-lang/rust/issues/163616
https://github.com/rust-lang/rust/issues/163311
2026-10-14 22:01:40 +00:00
bors
7df81381d0 Auto merge of #164322 - JonathanBrouwer:rollup-hdp0kJG, r=JonathanBrouwer
Rollup of 17 pull requests

Successful merges:

 - rust-lang/rust#162749 (Recover missing `turbofish` for `lifetime` arguments in expression position)
 - rust-lang/rust#164165 (Add a new `rustc_show_spans` internal attribute)
 - rust-lang/rust#164170 (Prefer WriteConsoleW for stdout on Windows)
 - rust-lang/rust#164208 (Implement better resolution for delegation `Self` mapping field)
 - rust-lang/rust#164255 (test DSL eagerly handle false constraints)
 - rust-lang/rust#163230 (Document zero-sized allocations properly for `Box` and `Vec`)
 - rust-lang/rust#163442 (Fix fudging)
 - rust-lang/rust#163940 (Parse move exprs as a bottom expr instead of a prefix expr)
 - rust-lang/rust#164079 (document some quirks around directory symlinks on Windows)
 - rust-lang/rust#164178 (Fix `diagnostic::on_unknown` format placeholder for paths in expressions and type paths)
 - rust-lang/rust#164219 (Windows FileExt trait doesn't need to handle ErrorKind::Interrupted; test improvements for same)
 - rust-lang/rust#164266 (rustdoc: Improvements for `rustc_must_implement_one_of`)
 - rust-lang/rust#164272 (Add regression test for rust-lang/rust#155977)
 - rust-lang/rust#164287 (Add regression test for hang in overlap check with GAT alias)
 - rust-lang/rust#164292 (Remove the `span_use_eq_ctxt` lint)
 - rust-lang/rust#164301 (fix issue number for feature(unsized_const_params))
 - rust-lang/rust#164309 (point at the opaque when its hidden type cannot be inferred)
2026-10-14 18:56:52 +00:00
Jonathan Brouwer
c0804539fd Rollup merge of #164309 - Albab-Hasan:point-at-opaque-for-unconstrained-hidden-type, r=lcnr
point at the opaque when its hidden type cannot be inferred

the note added in https://github.com/rust-lang/rust/pull/162172 now points at the opaque definition, unless the error already points inside it.

r? @lcnr
2026-10-14 19:29:37 +02:00
Jonathan Brouwer
3881053b60 Rollup merge of #164301 - khyperia:unsized-const-params-tracking-issue, r=lqd
fix issue number for feature(unsized_const_params)

was looking at the unstable-book page for unsized_const_params and had a rough time finding the tracking issue for it (the current issue number links to adt_const_params, not unsized_const_params)

for context, the tracking issue was created a couple days after https://github.com/rust-lang/rust/pull/127722 merged, and it hasn't been touched since

r? @BoxyUwU
2026-10-14 19:29:35 +02:00
Jonathan Brouwer
8ed03d5181 Rollup merge of #164292 - nnethercote:rm-span_use_eq_ctxt, r=lqd,Kivooeo
Remove the `span_use_eq_ctxt` lint

PR 163857 changed the span representation and reduced `eq_ctxt` to a trivial equality check, which means `span_a.ctxt() == span_b.ctxt()` is now an ok alternative to `span_a.eq_ctxt(span_b)`.

This commit removes `span_use_eq_ctxt` because it's no longer necessary. `eq_ctxt` remains because removing it would cause some churn; it might be worth doing as a follow-up.

r? @Kivooeo
2026-10-14 19:29:34 +02:00
Jonathan Brouwer
6adab090ec Rollup merge of #164287 - zakrad:regr-test-151503, r=adwinwhite
Add regression test for hang in overlap check with GAT alias

Fixes rust-lang/rust#151503

The hang was fixed by rust-lang/rust#156742.
2026-10-14 19:29:33 +02:00
Jonathan Brouwer
398a666b9d Rollup merge of #164272 - Kuksgauzen:test-155977, r=adwinwhite
Add regression test for #155977

The ICE was fixed by rust-lang/rust#156976. I checked the final test on its base build, `3c00c96d` (ICE), and its unrolled build, `5d29849f` (E0277, no ICE).
The test checks that this higher-ranked where-clause example fails to compile instead of causing an ICE in the new trait solver.

Closes rust-lang/rust#155977

cc @lcnr
2026-10-14 19:29:32 +02:00
Jonathan Brouwer
7c9e02f3af Rollup merge of #164266 - GuillaumeGomez:rustc_must_implement_one_of, r=Urgau
rustdoc: Improvements for `rustc_must_implement_one_of`

Fixes https://github.com/rust-lang/rust/issues/163675.

Funnily enough, most things are actually already there, so this PR is only an improvement over the following:

 * The methods listed in the note are now links.
 * The note itself got a little display improvement (unified with the existing ones mostly, screenshots below).
 * Added the `Required Methods` heading in the sidebar if `rustc_must_implement_one_of` is used

Before:

<img width="407" height="114" alt="Screenshot From 2026-10-13 16-30-39" src="https://github.com/user-attachments/assets/ccbe09bd-437a-45ab-a6ae-e77f02c68b19" />

After:

<img width="454" height="121" alt="Screenshot From 2026-10-13 16-30-47" src="https://github.com/user-attachments/assets/62b4e7a7-b727-4e25-ade4-7e530fd110cb" />

r? @Urgau
2026-10-14 19:29:30 +02:00
Jonathan Brouwer
92afc41c57 Rollup merge of #164219 - json420:windows-FileExt-test-cleanup, r=ChrisDenton
Windows FileExt trait doesn't need to handle ErrorKind::Interrupted; test improvements for same

This PR:
* Fixes the Windows `FileExt` `seek_read_exact()`, `seek_read_buf_exact()`, and `seek_write_all()` methods to pass up *all* errors as  `ErrorKind::Interrupted` does not occur natively on Windows
* Adds a new test to make sure `ErrorKind::Interrupted`  is handled correctly
* Cleans up existing tests and adds call counting checks

No LLMs were used in writing this PR.

Um, no Windows were locally used in writing this PR, either. I did my best with GitHub's CI to make sure these test work, but... can BORS be made to do a Windows only test on this PR first? I don't want to be the one messing up the merge again, haha.
2026-10-14 19:29:28 +02:00
Jonathan Brouwer
1c81bf9a15 Rollup merge of #164178 - mejrs:on_unknown-mod-names, r=mu001999
Fix `diagnostic::on_unknown` format placeholder for paths in expressions and type paths

See https://github.com/rust-lang/rust/pull/163636#issuecomment-6109283722 for context
2026-10-14 19:29:27 +02:00
Jonathan Brouwer
b6117ff8b5 Rollup merge of #164079 - RalfJung:win-dir-symlink, r=ChrisDenton
document some quirks around directory symlinks on Windows

We manage to almost entirely paper over the fact that Windows symlinks are very different from Unix symlinks in the portable `std::fs` methods... except for the case of removing a directory symlink, which requires different operations on Windows vs Unix.

Cc @ChrisDenton @the8472
2026-10-14 19:29:26 +02:00
Jonathan Brouwer
1097fe6bb2 Rollup merge of #163940 - fmease:move-expr-is-bottom-not-prefix, r=TaKO8Ki
Parse move exprs as a bottom expr instead of a prefix expr

`move(…)` is obviously meant to be a normal expr but since it was incorrectly treated as a prefix expr in the compiler, it meant it couldn't be used as the (left) operand of what I personally call "higher postfix operations"[^1], namely *Try*, *Call* / *Index* & "*Dot*" (*Field*, *Await*, …).

More concretely, it would mean we'd reject expressions like `move(…)?` (*Try*), `move(…)(…)` (*Call*), `move(…)[…]` (*Index*), `move(…).field` (*Field*), `move(…).method(…)` (*MethodCall*) or `move(…).await` (*Await*).

Furthermore, it would mean we'd parse `return move(0).field` like `(return move(0)).field` instead of `return ((move(0)).field)`.

---

It's immaterial whether the final version of move exprs continues to use syntax `move(…)` (a syntax much contended over at the RFC) or if it gets changed along the way (to e.g., `move { … }` (also quite controversial)), it remains a fact that move exprs are not prefix exprs!

---

CC @TaKO8Ki @nikomatsakis (https://github.com/rust-lang/rust/pull/155023)
Part of https://github.com/rust-lang/rust/issues/155050.

<sub>(No LLM was or will be used by me during the entire creation process of this PR)</sub>

[^1]: I.e., operations where the corresponding operator precedence is higher than or equal to the one of *Try*.
2026-10-14 19:29:25 +02:00
Jonathan Brouwer
ccaa545202 Rollup merge of #163442 - jdonszelmann:fix-fudging, r=lcnr
Fix fudging

r? @lcnr

This PR adds a postprocessing step to fudging: after fudging, any changes from the formal input type to the expected input type are only kept, if they result in structural changes. If the only change is one inference variable changing to another (fresh) inference variable, the formal one is kept, not the fresh one. This avoids cases in which those fresh inference variables are *less*  constrained than the original formal ones, and making them fresh has no benefit.

Fixes https://github.com/rust-lang/rust/issues/161913
Fixes https://github.com/rust-lang/rust/issues/118603

> [!NOTE]
> I've not used an LLM for any part of this PR, or any other PR I make. This includes any related work like research.
2026-10-14 19:29:23 +02:00
Jonathan Brouwer
ae776574e6 Rollup merge of #163230 - maxdexh:zero-sized-allocations-are-not-real-and-cannot-hurt-you, r=clarfonthey
Document zero-sized allocations properly for `Box` and `Vec`

Fixes rust-lang/rust#162799
2026-10-14 19:29:22 +02:00
Jonathan Brouwer
3734cf2a5a Rollup merge of #164255 - born-in-autumn:dsl-test-handle, r=khyperia
test DSL eagerly handle false constraints

For Context: https://github.com/rust-lang/project-assumptions-on-binders/issues/57

Changelog:
After getting the `constraints`, I immediately check whether it’s `false`, and if so, report an error right away. The issue mentions two places: one is when `forall` as a whole returns false, and the other is when there’s a `false constraints` at the top level. So the changes to `wfcheck.rs` cover both cases.
For the latter, maybe need to clear the existing `constraints`; otherwise it reports "higher-ranked lifetime bound could not be satisfied". I clear them by overwriting with `new_true`. I considered saving the old value and restoring it afterwards, but I think that’s more trouble than it’s worth. :)

finally, I added relevant test files following the pattern of other test files, and they pass.

llm disclosure: everything related to this issue was handwritten by me, with no LLM assistance.

thank you for your time!
2026-10-14 19:29:21 +02:00
Jonathan Brouwer
7178d28c4d Rollup merge of #164208 - aerooneqq:delegation-wrapping-field, r=petrochenkov
Implement better resolution for delegation `Self` mapping field

Connects a `Self` mapping field with a `FieldDef` during typecheck to support more cases: `struct W(S)`, `struct W { s: S }`.

Part of rust-lang/rust#118212.
r? @petrochenkov
2026-10-14 19:29:20 +02:00
Jonathan Brouwer
04b9f825b6 Rollup merge of #164170 - lhecker:windows-stdout-perf-is-console, r=ChrisDenton
Prefer WriteConsoleW for stdout on Windows

This PR reverts rust-lang/rust#159562 and changes stdout on Windows such that
all writes use `WriteConsoleW` _if_ stdout refers to a console.

This drops the `GetConsoleOutputCP` call, which would otherwise do an
RPC to the console server (= slow). This leaves us with `is_console`
which was using another RPC via `GetConsoleMode` (= doubly slow).
On Windows 8+ we can just use `NtQueryVolumeInformationFile()` to test
for `FILE_DEVICE_CONSOLE`, resulting in a ~2x console stdout speedup.

### Linewise output of `RELEASES.md`:

Output  | Version  | lines/s | MB/s  | Speedup
--------|----------|--------:|------:|--------
console | 1.99.0   |   31526 |  1.79 |
console | nightly  |   29251 |  1.66 |
console | **this** |   67294 |  3.82 | 2.13x
`NUL`   | 1.99.0   |  784311 | 44.50 |
`NUL`   | nightly  |  776529 | 44.06 |
`NUL`   | **this** | 1141618 | 64.78 | 1.46x

The console output speedup is very noticeable here,
as the time to run drops from 0.6s to just 0.25s.

### 128KiB chunked passthrough of `enwik8`:

Output  | Version  | MB/s    | Speedup
--------|----------|--------:|--------
console | 1.99.0   |   86.99 |
console | nightly  |  165.27 | 1.90x
console | **this** |  165.61 | 1.90x
`NUL`   | 1.99.0   | 1123.82 |
`NUL`   | nightly  | 1137.30 |
`NUL`   | **this** | 1289.35 |

The limiting factor here is `MAX_BUFFER_SIZE` which
deserves to be refactored in another PR in my opinion.
2026-10-14 19:29:18 +02:00
Jonathan Brouwer
03f0b69902 Rollup merge of #164165 - FranciscoTGouveia:rustc-show-spans-attr, r=petrochenkov
Add a new `rustc_show_spans` internal attribute

This new internal attribute is a first step for solving rust-lang/rust#126763.

Given the code:
```rust
#![feature(rustc_attrs)]

mod x { pub const Y: u8 = 1; }

macro_rules! path  { ($a:tt, $b:tt) => { let _ = $a::$b; }; }

#[rustc_show_spans(path)]
fn no_macro() { let _ = x::Y; }

#[rustc_show_spans(path)]
fn path_bug() { path!(x, Y); }
```

We can now report the spans and thus show the bug of the span not falling inside the macro context:
```
note: showing the spans of the path
 --> test.rs:8:25
  |
8 | fn no_macro() { let _ = x::Y; }
  |                         ^^^^

note: showing the spans of the path
  --> test.rs:11:23
   |
11 | fn path_bug() { path!(x, Y); }
   |                       ^^^^

```

r? @petrochenkov
2026-10-14 19:29:16 +02:00
Jonathan Brouwer
0c16e6d305 Rollup merge of #162749 - raushan728:issues/162656, r=nnethercote
Recover missing `turbofish` for `lifetime` arguments in expression position

Fixes rust-lang/rust#162656.

`Struct<'a> { .. }` and `f<'_>()` were parsed as a `<` comparison whose RHS is a label, producing a cascade of unrelated errors. `parse_path_segment` now accepts `<` followed by a lifetime and `>`/`,` in expression paths, emits one "use `::<...>`" suggestion, and parses the args normally.Since the recovery is inside the path parser, `path.span` and chained forms (`::new()`, `.method()`, `?`) work without AST fix-ups or new `Parser` state; it is guarded by `may_recover()`.

cc @estebank
2026-10-14 19:29:15 +02:00
aerooneqq
75b48eeb0f Implement better resolution for delegation mapping field 2026-10-14 14:31:49 +00:00
bors
f6c1107f8b Auto merge of #164284 - weihanglo:update-cargo, r=weihanglo
Update cargo submodule

14 commits in 29c5daa1afc262323364e039bb70c83372cc702c..3960fa69bb617e3d93c4ddc087c1b32bf12ad907
2026-10-07 22:13:48 +0000 to 2026-10-12 19:29:05 +0000
- refactor: modernize some API usages for 1.99 (rust-lang/cargo#17584)
- Removed some dead workspace tests (rust-lang/cargo#17582)
- Bypass rustup proxy when RUSTUP_TOOLCHAIN is an absolute path (rust-lang/cargo#17562)
- chore: Add an LLM disclosure to the PR template (rust-lang/cargo#17580)
- Restrict workspace-relative dep-info to workspace packages (rust-lang/cargo#17575)
- fix(layout): exclude a build-dir created as a parent from backups (rust-lang/cargo#17560)
- Avoid absolute paths in fingerprints if they are relative to the workspace root (rust-lang/cargo#17573)
- chore(deps): update msrv (3 versions) to v1.97 (rust-lang/cargo#17572)
- fix(job): Allow explicit child process breakaway on Windows (rust-lang/cargo#17527)
- fix(git): Add future-incompat warning in prep for removing auto-detection (rust-lang/cargo#17568)
- fix(config): Don't process includes for `credentials.toml` files (rust-lang/cargo#17569)
- doc(builtin-dep): Document the builtin package ID spec format (rust-lang/cargo#17564)
- test(mock-std): Set stable crate versions to 0.0.0 (rust-lang/cargo#17565)
- Fix: cargo installing from a directory source fails for binary packages with no dependencies. (rust-lang/cargo#17552)

r? ghost
2026-10-14 13:45:46 +00:00
Jakub Beránek
748fe74e8f Add id-token CI publish workflow permission 2026-10-14 06:56:35 -05:00
albab-hasan
3df075cdaa point at the opaque when its hidden type cannot be inferred
the note for an uninferable hidden type now points at the opaque definition, unless the error already points inside it
2026-10-14 16:37:25 +06:00
Jana Dönszelmann
731b6596f3 bless tests 2026-10-14 11:15:32 +02:00
bors
d8ef4f3fe7 Auto merge of #164285 - JonathanBrouwer:rollup-kX2T7LS, r=JonathanBrouwer
Rollup of 3 perf-sensitive pull requests

Successful merges:

 - rust-lang/rust#162727 (Support function args const generics)
 - rust-lang/rust#164059 (perf: drop error in `unwrap_failed` instead of `unwrap`)
 - rust-lang/rust#164236 (Move `fully_perform` early return earlier)
2026-10-14 08:29:20 +00:00
mejrs
f76d6135a1 Use proper mod name for on_unknown attribute 2026-10-14 09:31:41 +02:00
mejrs
f5e4813942 add test 2026-10-14 09:19:48 +02:00
khyperia
9aa0839b0b fix issue number for feature(unsized_const_params) 2026-10-14 08:36:45 +02:00
Robin
6c150feb0f fix some nits 2026-10-14 09:56:48 +08:00
Leonard Hecker
9c1eb80499 Prefer WriteConsoleW for stdout on Windows
This drops the `GetConsoleOutputCP` call, which would otherwise do an
RPC to the console server (= slow). This leaves us with `is_console`
which was using another RPC via `GetConsoleMode` (= doubly slow).
On Windows 8+ we can just use `NtQueryVolumeInformationFile()` to test
for `FILE_DEVICE_CONSOLE`, resulting in a ~2x console stdout speedup.
2026-10-14 02:30:42 +02:00
Nicholas Nethercote
c0976820bf Remove the span_use_eq_ctxt lint
PR 163857 changed the span representation and reduced `eq_ctxt` to a
trivial equality check, which means `span_a.ctxt() == span_b.ctxt()` is
now an ok alternative to `span_a.eq_ctxt(span_b)`.

This commit removes `span_use_eq_ctxt` because it's no longer necessary.
`eq_ctxt` remains because removing it would cause some churn; it might
be worth doing as a follow-up.
2026-10-14 11:15:41 +11:00
bors
2d37576c3d Auto merge of #164280 - JonathanBrouwer:rollup-TB4A9Bg, r=JonathanBrouwer
Rollup of 12 pull requests

Successful merges:

 - rust-lang/rust#164040 (move `BoundVarReplacer` into rustc_type_ir)
 - rust-lang/rust#162934 (bootstrap: Let test-float-parse follow --target)
 - rust-lang/rust#164269 (convert non-generic diagnostic attribute placeholders to snake_case)
 - rust-lang/rust#160050 (Fix a splat legacy demangling display bug)
 - rust-lang/rust#163383 (Provide context span pointing at trait/item when talking about assoc items)
 - rust-lang/rust#164023 (make `with_post_analysis_normalized` invalidate rigid aliases)
 - rust-lang/rust#164041 (Add regression test for dead-code with external trait impl)
 - rust-lang/rust#164166 (Ignore thread-related tests for UEFI)
 - rust-lang/rust#164229 (Update outdated `hir_attrs` doc)
 - rust-lang/rust#164244 (Remove the 'sup' method from 'At' and migrate uses to 'sup_raw')
 - rust-lang/rust#164257 (Add transmutability test to cover for superseded PR)
 - rust-lang/rust#164263 (Fix expected output for x86-64-sysv64-arg-ext.apple.stderr)
2026-10-13 22:04:35 +00:00
zakrad
6ffc09af46 Add regression test for hang in overlap check with GAT alias 2026-10-14 01:07:08 +03:30
Jonathan Brouwer
480c8c2041 Rollup merge of #164236 - nnethercote:fully_perform-early-return, r=lcnr
Move `fully_perform` early return earlier

Two cleanup commits and then a performance improvement. Details in the commit messages.

r? @lcnr
2026-10-13 23:00:42 +02:00
Jonathan Brouwer
3e443d8ad0 Rollup merge of #164059 - jnkel:outline-result-unwrap-drop, r=scottmcm
perf: drop error in `unwrap_failed` instead of `unwrap`

Context: https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/40-byte.20copy.20of.20unwrapped.20Result.3CT.2C.20.28.29.3E.20payload.20survives.20-O3/with/630360641

This PR changes `Result::unwrap` to pass the error by value into `unwrap_failed` rather than by reference. This makes `unwrap` no longer responsible for dropping the error after `unwrap_failed` panics, which reduces code size and compilation times and enables  MIR-inlining of `unwrap`.

The downside is that it introduces another function that must be monomorphized per error type (though the formatting part stays polymorphic); but it turned out to be a net perf win. I tried keeping the `unwrap_failed` fully polymorphic by passing the error as `&mut ManuallyDrop<dyn Debug>`, but this turned out to be worse for performance.

[The first perf run](https://github.com/rust-lang/rust/pull/164059#issuecomment-6090859813) matches the current state of this PR ([the second one](https://github.com/rust-lang/rust/pull/164059#issuecomment-6093489095) is for the ManuallyDrop implementation that turned out to be slower).

Generated code comparison (with an example of an error that has a destructor so that the landing pad shows up in the assembly post-LLVM): https://rust.godbolt.org/z/ajjYMTc7Y

Old:
```asm
        push    r14
        push    rbx
        sub     rsp, 24
        cmp     qword ptr [rsi], -1
        je      .LBB5_1
        mov     rax, qword ptr [rsi + 16]
        mov     qword ptr [rdi + 16], rax
        movups  xmm0, xmmword ptr [rsi]
        movups  xmmword ptr [rdi], xmm0
        mov     rax, rdi
        add     rsp, 24
        pop     rbx
        pop     r14
        ret
.LBB5_1:
        mov     eax, dword ptr [rsi + 8]
        mov     dword ptr [rsp + 4], eax
        lea     rdi, [rip + .Lanon.99b5833966418e083b8bdda9f0bfd3cb.1]
        lea     rcx, [rip + .Lanon.99b5833966418e083b8bdda9f0bfd3cb.0]
        lea     r8, [rip + .Lanon.99b5833966418e083b8bdda9f0bfd3cb.8]
        lea     r14, [rsp + 4]
        mov     esi, 43
        mov     rdx, r14
        call    qword ptr [rip + core[a9090a07a7fa7517]::result::unwrap_failed@GOTPCREL]
        ud2
        mov     rbx, rax
        mov     qword ptr [rsp + 8], r14
        mov     rax, qword ptr [rip + <i32 as core[a9090a07a7fa7517]::fmt::Display>::fmt@GOTPCREL]
        mov     qword ptr [rsp + 16], rax
        lea     rdi, [rip + .Lanon.99b5833966418e083b8bdda9f0bfd3cb.11]
        lea     rsi, [rsp + 8]
        call    qword ptr [rip + std[c29fa2d9dbea2b0e]::io::stdio::_print@GOTPCREL]
        mov     rdi, rbx
        call    _Unwind_Resume@PLT
        call    qword ptr [rip + core[a9090a07a7fa7517]::panicking::panic_in_cleanup@GOTPCREL]
```

New:
```asm
example[32c4274de85e6574]::generic::unwrap:
        cmp     qword ptr [rsi], -1
        je      .LBB7_2
        mov     rax, qword ptr [rsi + 16]
        mov     qword ptr [rdi + 16], rax
        movups  xmm0, xmmword ptr [rsi]
        movups  xmmword ptr [rdi], xmm0
        mov     rax, rdi
        ret
.LBB7_2:
        push    rax
        mov     edx, dword ptr [rsi + 8]
        lea     rdi, [rip + .Lanon.99b5833966418e083b8bdda9f0bfd3cb.1]
        lea     rcx, [rip + .Lanon.99b5833966418e083b8bdda9f0bfd3cb.10]
        mov     esi, 43
        call    example[32c4274de85e6574]::generic::unwrap_failed::<example[32c4274de85e6574]::Error>
```
2026-10-13 23:00:41 +02:00
Jonathan Brouwer
49c9894174 Rollup merge of #162727 - bit-aloo:2026-09-06-function-argument-const-generics, r=khyperia
Support function args const generics

This PR adds initial support for argument-position const generics behind the `function_arg_const_generics` feature gate.

It allows const generics to be declared directly in function arguments. The PR adds the basic plumbing across AST, HIR, and `ty`, parses  these parameters into the function's generics, lowers call arguments into consts. For now, we lower literals, negated literals, const parameters, const items, unit variants, and etc, This works for functions, methods and a couple of more cases.

r? @BoxyUwU
cc: @khyperia
2026-10-13 23:00:40 +02:00
Weihang Lo
1ad7cfc635 Update cargo submodule 2026-10-13 16:35:42 -04:00
Guillaume Gomez
cad2ab9ffe Add regression test for rustc_must_implement_one_of changes 2026-10-13 21:37:09 +02:00
Jonathan Brouwer
6c9bf4d4cd Rollup merge of #164263 - liza371:fix-x86-64-apple, r=lqd
Fix expected output for x86-64-sysv64-arg-ext.apple.stderr

This fixes test failures Chromium saw as a result of rust-lang/rust#156112, since x86 apple bots are tier 2 I understand that support is best effort.

Used `--bless` for the test output on an apple silicon mac, but I did run this on an x86 mac bot and the test succeeded.
2026-10-13 21:29:49 +02:00
Jonathan Brouwer
3faa7df77f Rollup merge of #164257 - lsunsi:pull149228, r=ShoyuVanilla
Add transmutability test to cover for superseded PR

Adds a test present in https://github.com/rust-lang/rust/pull/149228
that was fixed by https://github.com/rust-lang/rust/pull/163946.
2026-10-13 21:29:47 +02:00
Jonathan Brouwer
9b79cc7feb Rollup merge of #164244 - fallible-algebra:at-removal/remove-sup, r=lcnr
Remove the 'sup' method from 'At' and migrate uses to 'sup_raw'

Continuation of rust-lang/rust#163978
2026-10-13 21:29:46 +02:00
Jonathan Brouwer
37f172b11d Rollup merge of #164229 - mejrs:hir_attrs_doc, r=beetrees
Update outdated `hir_attrs` doc
2026-10-13 21:29:45 +02:00
Jonathan Brouwer
832134d2f4 Rollup merge of #164166 - Ayush1325:uefi-tests, r=joboet
Ignore thread-related tests for UEFI

- UEFI is does not have threads. So skip tests that need threads to compile/run.
- Encountered when running Rust test suite for UEFI target.
2026-10-13 21:29:44 +02:00
Jonathan Brouwer
89443daf3f Rollup merge of #164041 - 39la:test/dead-code-issue-142541, r=camelid
Add regression test for dead-code with external trait impl

Hi, this is my first contribution! :)
This PR adds a regression UI test for and closes rust-lang/rust#142541 .

I checked the test fails before c93fac7d64 (from rust-lang/rust#142485) and passes on current main.
2026-10-13 21:29:42 +02:00
Jonathan Brouwer
be2e603709 Rollup merge of #164023 - adwinwhite:env_clean, r=lcnr
make `with_post_analysis_normalized` invalidate rigid aliases

Tracking typing env transition is necessary for rigid aliases to be correct. However, it's quite brittle and requires much care to deal with.

We now remind compiler devs to invalidate their rigid aliases when entering `PostAnalysis` typing mode via `with_post_analysis_normalized`. Basically they need to fold data that's carried across the typing env transition.
See the comments on `with_post_analysis_normalized_invalidating_rigid_aliases` for details.

The tests are taken from https://gist.github.com/lcnr/e173ec9238fcbdd62b14320cb3b9864d

It's planned to generalize this pattern to other constructors in followups since they're less straightforward.

r? lcnr
2026-10-13 21:29:41 +02:00