Skip to content

Rustc pull update - #3014

Merged
tshepang merged 35 commits into
mainfrom
rustc-pull
Sep 14, 2026
Merged

tshepang merged 35 commits into
mainfrom
rustc-pull

Conversation

@workflows-rustc-dev-guide

Copy link
Copy Markdown

Latest update from rustc.

bors and others added 30 commits September 7, 2026 12:14
Make `VaArgSafe` dyn-incompatible

This is done just in case we want to later do stuff like adding a `Sized` supertrait.

See discussion at [#t-libs > Should `VaArgSafe` require `Sized`?](https://rust-lang.zulipchat.com/#narrow/channel/219381-t-libs/topic/Should.20.60VaArgSafe.60.20require.20.60Sized.60.3F/with/622074620)

r? @clarfonthey
…ochenkov

Restrict LLVM inline asm location cookie usage. Fixes #150451

The parallel frontend makes the cookies nondeterministic in their current form, resulting in nondeterministic outputs when bitcode is emitted or LTO is used.

Causes minor diagnostic regression for inline asm in release builds. See rust-lang/rust#150451 for details.

Fixes rust-lang/rust#150451

r? bjorn3
Reflection refactor ptrs

Tracking issue rust-lang/rust#146922

Part of the [Refactoring to many methods](https://rust-lang.zulipchat.com/#narrow/channel/572285-goals.2Freflection/topic/Refactoring.20to.20many.20methods/with/592226560) reflection subgoal. See that for the full context. In short for various reasons we are moving from an enum `TypeKind` where the variants hold the types information to one that just tells you the type kind. Separate methods on `TypeId` provide a way to get to the data that used to be in the variant.

Since function pointers have a lot of fields it felt better to keep the `FnPtr` struct we have now then add an intrinsic for each field.

r? @oli-obk
add test ensuring we refuse to const-eval the body of a rustc_do_not_const_check function

IMO this is crucial, to ensure that we cannot break users by changing the body of such a function to something no-longer-const-compatible.

r? @oli-obk
Add a regression test for trailing attributes in doctests

Adds a regression test for rust-lang/rust#162131, rust-lang/rust#162129, rust-lang/rust#162349, and rust-lang/rust#162352

It seems likely this breakage is going to be accepted, so let's add a test in nightly so we can at least track this behavior in the feature
rustc-dev-guide subtree update

Subtree update of `rustc-dev-guide` to 68c7e21.

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

r? @ghost
…uwer

Rollup of 11 pull requests

Successful merges:

 - rust-lang/rust#158153 (avoid spurious lifetime diagnostic in async generic case)
 - rust-lang/rust#160197 (Restrict LLVM inline asm location cookie usage. Fixes rust-lang/rust#150451)
 - rust-lang/rust#162413 (Unconditionally invalidate the library when the compiler changes)
 - rust-lang/rust#162294 (Reflection refactor ptrs)
 - rust-lang/rust#162354 (Make comptime functions ineligible for coverage)
 - rust-lang/rust#162379 (add test ensuring we refuse to const-eval the body of a rustc_do_not_const_check function)
 - rust-lang/rust#162386 (Add a regression test for trailing attributes in doctests)
 - rust-lang/rust#162410 (std: remove exceed whitespace in docs)
 - rust-lang/rust#162420 (mir_build: Don't pass a redundant `scrutinee_span` to some MIR-build methods)
 - rust-lang/rust#162430 (rustc-dev-guide subtree update)
 - rust-lang/rust#162431 (add next-solver FIXMEs)
Use IndexVec instead of BTreeMap for polonius variances

This results in wins, ranging from negligible to significant, for Polonius Alpha. 

r? lqd
I ended up deciding not to add docs about `bounds` as it seems like a
relatively minor feature of the derive, and there are docs at [1].

[1]: https://github.com/rust-lang/rust/blob/3ffb26fbf5bf232cf59e314e75ea325973f4f583/compiler/rustc_type_ir_macros/src/lib.rs#L21-L55
…, r=jieyouxu

Pin the number of frontend threads while gathering PGO to 1

This will be important after rust-lang/rustc-perf#2574 is synced here, to avoid running some benchmarks multiple times unexpectedly.

But we can do it proactively, the CLI argument should already be in the in-tree `rustc-perf` version (hopefully, let's see).
Add tests and docs for `#[derive(GenericTypeVisitable)]`

..given the added complexity from the newly-added `bounds` attribute

Follow-up to rust-lang/rust#160914

More details in individual commits.

cc @JonathanBrouwer (you might want to take over the review of this since you have some context already.. but as you wish)
cc @ChayimFriedman2
…apkin

run `extern "tail"` with `byval` argument test

With LLVM 23 we can run `extern "tail"` tests with `byval` arguments on x86 and x86_64. AArch64 does not (yet) support this, see llvm/llvm-project#206718.
…yukang

Only check `#[allow(dead_code)]` on the trait

I edited on an old branch (on another machine) when trying to resolve the first comment in rust-lang/rust#161571, and then force-pushed it. So it introduced the behavior in rust-lang/rust#157885 partially.

I found this when rebasing rust-lang/rust#157885, and I was expecting a conflict about this.

r? chenyukang
Call renumberMetadataForAssembly() in LLVMRustPrintModule()

Some metadata got reordered in llvm/llvm-project#220390
Update books

## rust-lang/book

1 commits in 917544888a55e4da7109bdba8c88c893c0da70f4..1500248d8f230566e4ec9f27fcbb8fe9e2898ab1
2026-09-02 16:04:34 UTC to 2026-09-02 16:04:34 UTC

- Update to Rust 1.98 (rust-lang/book#4823)

## rust-lang/edition-guide

1 commits in f5abcf137698e5ad6ebed359d69654ff705346af..ab8544aeed7b792984366aa122ac19bd47ad9a2f
2026-08-25 19:50:54 UTC to 2026-08-25 19:50:54 UTC

- Update never-type-fallback for never type stabilization (rust-lang/edition-guide#384)

## rust-lang/reference

12 commits in 3b38834b39f732c64686f7c64aa29dcf3cd83ba5..e24eecf97b0c9a6dbac67191098204dc8a190aaa
2026-09-02 04:25:27 UTC to 2026-08-25 07:52:18 UTC

- Fix nested block comment grammar (rust-lang/reference#2348)
- dangling pointers: turn some consequences of the definition into notes (rust-lang/reference#2336)
- Fix the nightly grammar validation job (rust-lang/reference#2347)
- Order grammar summary deterministically (rust-lang/reference#2346)
- Remove leftover `types/textual.md` file (rust-lang/reference#2345)
- Fix non-leaf rules with bodies (rust-lang/reference#2344)
- Fix rule IDs not following the header hierarchy (rust-lang/reference#2343)
- Fix heading level of the `verbatim` modifier section (rust-lang/reference#2342)
- Fix `...diagnostics.deprecated...` rule ID (rust-lang/reference#2341)
- Update for stabilization of the never type (rust-lang/reference#2283)
- Add missing punctuation (rust-lang/reference#2339)
- Fix field-less `repr(C)` enum docs (rust-lang/reference#2018)
…ic-attribute-lint, r=mejrs

Add regression test for item-local diagnostic attribute lint levels

Closes rust-lang/rust#135772

This issue was fixed by rust-lang/rust#160499 indirectly.

r? @mejrs
Update codegen-llvm/inline-debuginfo.rs for distinct DILocation

This updates the expectations to work after llvm/llvm-project#204817
docs(time): replace "method" with "function"

I used the word "method" in rust-lang/rust#162195 and rust-lang/rust#162199, but these are associated functions, not methods, so I think it's correct to use the word "function".

@rustbot label +A-docs
Fix my duplicate thanks entry

r? @ghost

I accidentally committed with the wrong email :3
…uwer

Rollup of 12 pull requests

Successful merges:

 - rust-lang/rust#162462 (Fix unsoundness in `VecDeque::from_iter(vec::IntoIter)`)
 - rust-lang/rust#162468 (mir_build: Rename `lower_let_expr` to `lower_fallible_let`, and clarify)
 - rust-lang/rust#161806 (Add tests and docs for `#[derive(GenericTypeVisitable)]`)
 - rust-lang/rust#161912 (run `extern "tail"` with `byval` argument test)
 - rust-lang/rust#161932 (Only check `#[allow(dead_code)]` on the trait)
 - rust-lang/rust#162236 (Call renumberMetadataForAssembly() in LLVMRustPrintModule())
 - rust-lang/rust#162435 (windows-gnu: document libgcc requirement)
 - rust-lang/rust#162439 (Update books)
 - rust-lang/rust#162451 (Add regression test for item-local diagnostic attribute lint levels)
 - rust-lang/rust#162455 (Update codegen-llvm/inline-debuginfo.rs for distinct DILocation)
 - rust-lang/rust#162459 (docs(time): replace "method" with "function")
 - rust-lang/rust#162465 (Fix my duplicate thanks entry)
offload: automate manual clang-linker-wrapper step

automate manual clang-linker-wrapper step from https://rustc-dev-guide.rust-lang.org/offload/usage.html
extract bitcode from device.bin and then wraps it into the host module.
needs some refactoring.

r? @ZuseZ4
…enkov

windows-gnullvm: always link libunwind statically

Previously shared library was used by default, meaning that programs and libraries couldn't be loaded if `libunwind.dll` was missing from the PATH. Using Wine (on Linux) because it better shows the problem (and is more convenient):
```
❯ cargo new hello &> /dev/null

❯ cargo rustc --target x86_64-pc-windows-gnullvm &> /dev/null

❯ wine target/x86_64-pc-windows-gnullvm/debug/hello.exe
0024:err:module:import_dll Library libunwind.dll (which is needed by L"Z:\\tmp\\hello\\target\\x86_64-pc-windows-gnullvm\\debug\\hello.exe") not found
0024:err:module:loader_init Importing dlls for L"Z:\\tmp\\hello\\target\\x86_64-pc-windows-gnullvm\\debug\\hello.exe" failed, status c0000135

❯ llvm-readobj --coff-imports target/x86_64-pc-windows-gnullvm/debug/hello.exe
...
Import {
  Name: libunwind.dll
  ImportLookupTableRVA: 0x3D308
  ImportAddressTableRVA: 0x3D678
  Symbol: _GCC_specific_handler (0)
  Symbol: _Unwind_DeleteException (0)
  Symbol: _Unwind_GetDataRelBase (0)
  Symbol: _Unwind_GetIPInfo (0)
  Symbol: _Unwind_GetLanguageSpecificData (0)
  Symbol: _Unwind_GetRegionStart (0)
  Symbol: _Unwind_GetTextRelBase (0)
  Symbol: _Unwind_RaiseException (0)
  Symbol: _Unwind_Resume (0)
  Symbol: _Unwind_SetGR (0)
  Symbol: _Unwind_SetIP (0)
}
...
```
Optionally libunwind could be linked statically via `+crt-static`:
```
❯ cargo rustc --target x86_64-pc-windows-gnullvm -- -C target-feature=+crt-static &> /dev/null

❯ wine target/x86_64-pc-windows-gnullvm/debug/hello.exe
Hello, world!

❯ llvm-readobj --coff-imports target/x86_64-pc-windows-gnullvm/debug/hello.exe | rg 'libunwind.dll' || echo "doesn't depend on shared libunwind"
doesn't depend on shared libunwind
```

After a discussion of approach in rust-lang/rust#159782 with @bjorn3 (thanks BTW!), I changed the proposed approach to always link static libunwind.

I don't have a good solution for rust-lang/rust#121794 that will resurface. I guess the user has three options:
- symlink `libunwind.dll.a` as `libunwind.a`
- add `--unwindlib=none -lunwind` to the linker args
- create linker wrapper
- use self-contained mode which is likely is undesirable

I think the ease of use (not having to deal with additional DLL dependency) outweights the benefit of working with incomplete C toolchain.

The size bloat is also not a problem, sizes (in bytes) of the binary for the literal hello world project:
- debug build:
  - shared libunwind 4194816
  - static libunwind 4323328
- release build:
  - shared libunwind 382464
  - static libunwind 423424

Debug diff +125.5 KiB, release diff: +40 KiB.
Size of `libunwind.dll` that has to be provided when linking shared libunwind: 204288 bytes (199.5 KiB).
…p_constraints, r=BoxyUwU

trait_selection: Keep type-op region constraints in borrowck

I ran into this while working on rust-lang/rust#158588. `borrowck_env_fail` still had a FIXME because the function body wasn't reporting the outlives error. The next solver creates the region constraint, but the canonical type-op path doesn't put it in `QueryResponse`. Borrowck never sees it, so the type op looks fine and the error is lost.

With `-Zassumptions-on-binders`, these type ops now run locally on borrowck's `InferCtxt`. The fast path still runs first. That leaves the constraint in the same inference context borrowck reads later.

I prefer this over adding more data to the old canonical response. The next solver already caches its work, and teaching the old query path about these constraints felt like extra machinery for something we can avoid. Running locally is pretty boring, but I think that's a good thing here. The old FIXME is now the regression test.
Fix unsoundness bug on next trait solver for dyn const generics placeholder

This seem to fix the related test, which would compile on next trait solver and should not.
It's related to the linked issue where it'd lead to a segmentation fault.

Closes rust-lang/trait-system-refactor-initiative#296

r? @BoxyUwU
…uwer

Rollup of 6 pull requests

Successful merges:

 - rust-lang/rust#162309 (offload: automate manual clang-linker-wrapper step)
 - rust-lang/rust#160505 (delegation: supporting inherent impls)
 - rust-lang/rust#160712 (windows-gnullvm: always link libunwind statically)
 - rust-lang/rust#161423 (trait_selection: Keep type-op region constraints in borrowck)
 - rust-lang/rust#162461 (limit the api of `fold_predicate` and `visit_predicate`)
 - rust-lang/rust#162475 (Fix unsoundness bug on next trait solver for dyn const generics placeholder)
Use `DenseBit` for `drop_live_at` in liveness tracing

I noticed that `drop_live_at` only ever gets point, and never range, inserts, so I switched it over to `DenseBitSet`. This provides some nice [wins](https://perf.rust-lang.org/compare.html?start=745de6eca673de5329ec68f2689629a5ca45ab35&end=d1837740534cbf87b9fe919b7a89debf46362197&stat=instructions:u) on `serde`.

However, the `add_drop_live_facts_for` function expects to receive an `IntervalSet`. I first tried to switch the type of `LiveRegions::AtPoints` from `SparseIntervalMatrix` to `SparseBitMatrix`, but that had [regressions](https://perf.rust-lang.org/compare.html?start=745de6eca673de5329ec68f2689629a5ca45ab35&end=c87f1fbff20351758b66ae945c16e061ab4ae54c&stat=instructions:u). 

So in this PR, I simply reconstruct an `IntervalSet` from a `DenseBitSet`. Not super pretty, but perf. looks reasonable.

Let me know if this makes sense or not! :)

r? jackh726
bors and others added 5 commits September 9, 2026 17:00
Drop host tools from `i686-pc-windows-msvc`



Implements [RFC 3999](rust-lang/rfcs#3999).
Fixes rust-lang/rust#158378

I have collapsed two test jobs into one because the second one no longer runs any tests: rust-lang/rust#162288 (comment)
Add `gdb-repr` directive for `tests/debuginfo`



Part of rust-lang/rust#148483 and followup to rust-lang/rust#158298. Applies (approximately) identical logic to GDB.

I still need to test things on `windows-gnu` (and locally try a few more tests to see if there's any glaring issues). There's also a few bike-sheddy things.

The main way this differs from the LLDB implementation is that GDB doesn't use `lldb_batchmode/runner.py` to orchestrate the commands. Instead, I have `compiletest` import `from_gdb.py` which registers a custom `repr` CLI command. GDB's batch processing works as normal, but dispatches to our logic automatically whenever it encounters `repr <var_name>`.

An additional `repr-finalize` CLI command is also registered to implement the checks that ensure we encountered all expected types/vars, and verifies that there were no errors before saving blessed data.

r? @Kobzol, @jieyouxu
…ingle-access, r=petrochenkov

perf: Read hygiene data once when hashing syntax contexts
This updates the rust-version file to 4b6d04e706108ccfeafe2547fbe857dfe8972bad.
@rustbot

rustbot commented Sep 14, 2026

Copy link
Copy Markdown
Collaborator

Thanks for the PR. If you have write access, feel free to merge this PR if it does not need reviews. You can request a review using r? rustc-dev-guide or r? <username>.

@rustbot rustbot added the S-waiting-on-review Status: this PR is waiting for a reviewer to verify its content label Sep 14, 2026
@tshepang
tshepang merged commit 62b1ff1 into main Sep 14, 2026
4 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: this PR is waiting for a reviewer to verify its content label Sep 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants