Skip to content

Rollup of 18 pull requests - #161498

Closed
JonathanBrouwer wants to merge 51 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-nmZ7BwI
Closed

Rollup of 18 pull requests#161498
JonathanBrouwer wants to merge 51 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-nmZ7BwI

Conversation

@JonathanBrouwer

Copy link
Copy Markdown
Member

Successful merges:

Failed merges:

r? @ghost

Create a similar rollup

blyxyas and others added 30 commits July 14, 2026 13:47
The supposed output path was incorrect. Using `-Zdump-dep-graph` does NOT emit to
`/tmp/dep_graph.gv`, but to 2 files, one being `dep_graph.txt` and the other `dep_graph.dot` in the current directory
This requires moving PanicPayload to alloc.
Canonical type-op queries discard NextGen constraints, so function-body
failures never reached NLL. Evaluate those ops locally under
-Zassumptions-on-binders and preserve the origin span on the resulting
outlives constraints.
Keep this branch focused on reporting solver region constraints. The type-op behavior and its borrowck coverage are handled separately.
Add some documentation for `rustc_type_ir` and `SolverDelegate`.
`from_immediate` calls left over from refactor d3d3485 can create invalid LLVM IR
… use symbolic links in `copy_link_internal`
These fields served to query the bitwidth for both and whether an
integer is signed or not. The bitwith is now provided by `TypeId::bits`
while the signedness can be gotten trough the earlier introduces
`TypeId::is_signed`.
* Add Arc/Rc::strong_count_from_raw
* Drop the global allocator requirement from strong_count_from_raw

The clause came from increment_strong_count and decrement_strong_count,
where it holds because those rebuild an Arc<T, Global> through
from_raw_in and the decrement path frees through the global allocator.
Reading the strong count never builds or drops one, and the allocator
lives on the Arc rather than in the allocation, so it does not carry
over.
* std: refine docs for strong_count_from_raw
resolver diagnostics: don't swallow labels and point out  similar items as a note, not a label

This was also swallowing labels from `diagnostic:on_unknown`; a typo suggestion would override it.
…they

Improve the ABI between the panic runtime and libstd

* Use the Rust ABI rather than C ABI
* Mark some extern functions as safe
* Move `PanicPayload` from libcore to liballoc and directly reference `Box<dyn Any>` instead of `*mut dyn Any`
* Avoid an unnecessary allocation with panic=abort

Follow up to rust-lang#160440
…nthey

Add safety comments in alloc::Wtf8

This PR follow up rust-lang#160824 and add some safety section for unsafe APIs. This PR focus on Wtf8 in alloc and fix every `Untriged` mentioned in rust-lang#160824.

Before this PR, rust-lang#161271 had add some safety sections for Wtf8 in core.

I'm looking forward to your review and give me any feedback to improve this PR.
Add some `rustc_type_ir` comments

This PR adds a few comments to `rustc_type_ir`, some of its key components, and `SolverDelegate`. These are the most important and common traits one encounters and some docs will be helpful. Most of it is coming from the prose in https://rustc-dev-guide.rust-lang.org/solve/sharing-crates-with-rust-analyzer.html
Remove leftover immediate creation

`from_immediate` calls left over from refactor d3d3485 can create invalid LLVM IR
Use `symlink_dir` to create junctions on Windows instead of trying to use symbolic links in `copy_link_internal`

Symbolic links require extra privileges on Windows, so this falls back to creating junctions in `symlink_file` when operating on a directory.
…om-raw, r=Mark-Simulacrum

Add Arc/Rc::strong_count_from_raw

Tracking issue: rust-lang#157021
Accepted ACP: rust-lang/libs-team#792

Adds `strong_count_from_raw` to `Arc` and `Rc`: read the strong count directly from a raw pointer, without reconstructing the smart pointer. The existing workaround is `ManuallyDrop::new(Arc::from_raw(ptr))` + `strong_count`, which takes ownership of a reference the caller doesn't own and could cause a double free if not using it properly, the detailed motivation of this in the ACP.

This PR implements strong count only, libs-api deferred weak count until there's a concrete use case.

The body reads the counter by walking back `data_offset` the way `from_raw_in` does, instead of materializing a temporary `Arc`/`Rc`, the call can't accidentally take ownership, and the `Relaxed` load matches `strong_count`. Lives next to `increment_strong_count`/`decrement_strong_count`.

Safety doc: pointer to the value of a live allocation with valid metadata (feeds `data_offset`),  such as pointer returned by `into_raw`, `into_raw_with_allocator`, `as_ptr`.  `T` aligned like that value, strong count ≥ 1 for the duration of the call.
…h726

Update documentation for `-Zdump-dep-graph`

The supposed output path was incorrect. Using `-Zdump-dep-graph` does NOT emit to `/tmp/dep_graph.gv`, but to 2 files, one being `dep_graph.txt` and the other `dep_graph.dot` in the current directory

r? @jackh726 :: Because kinda related to Incremental Systems Rethought.
… r=oli-obk

Remove fields from TypeKind: Bool, Char, Float and Int

Tracking issue rust-lang#146922

r? @oli-obk

Part of [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 context.
…ering-dtors-in-fibers, r=ChrisDenton

Avoid arming the Windows TLS destructor guard in fibers

After rust-lang#157645, we use FLS to trigger destructors for thread locals.

In bytecodealliance/wasmtime#14184, it turned out that there's an edge case we didn't cover: if `thread_local/guard/windows.rs::enable` is called from a fiber and later, in a different fiber: (1) the fiber is converted back to a thread and (2) the thread deletes the original fiber, we incorrectly triggers the FLS destructors prematurely.

The fix is simple - avoid arming the FLS slot (setting it to 1) if the calling thread is a fiber.

The issue happened on mingw because it does have target thread local. Tested locally by forcing `registered = false` and checked that the new test fails without the fix.

r? @ChrisDenton
…use-data, r=folkertdev

Use bitset for locals_with_use_data

There seems to be very little reason to use Vec of bools, the whole map allocates space for every element anyway.

Not sure how is impactful this is, I noticed it randomly in the code, but this seems like cleaner way to do it (and more common in the compiler codebase)
…, r=jieyouxu

Warn about running ui-fulldeps tests in stage 1

Mentioned [here](rust-lang#136939 (comment)).

r? jieyouxu
@rust-bors rust-bors Bot added the rollup A PR which is a rollup label Aug 22, 2026
@rustbot rustbot added A-meta Area: Issues & PRs about the rust-lang/rust repository itself A-rustc-dev-guide Area: rustc-dev-guide 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-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler 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 Aug 22, 2026
@JonathanBrouwer

Copy link
Copy Markdown
Member Author

@bors r+ p=5

@rust-bors

rust-bors Bot commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

📌 Commit ba5b504 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 Aug 22, 2026
@rust-bors rust-bors Bot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Aug 22, 2026
@rust-bors

rust-bors Bot commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

This pull request was unapproved due to being closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-meta Area: Issues & PRs about the rust-lang/rust repository itself A-rustc-dev-guide Area: rustc-dev-guide A-testsuite Area: The testsuite used to check the correctness of rustc rollup A PR which is a rollup S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler 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.