Skip to content

Rollup of 2 pull requests#157858

Merged
rust-bors[bot] merged 5 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-TnNKRa4
Jun 13, 2026
Merged

Rollup of 2 pull requests#157858
rust-bors[bot] merged 5 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-TnNKRa4

Conversation

@JonathanBrouwer

Copy link
Copy Markdown
Contributor

Successful merges:

r? @ghost

Create a similar rollup

LeSingh1 and others added 5 commits June 11, 2026 13:09
Explain that the weak count doubles as a lock taken by get_mut and
downgrade, and that the value 1 is the implicit weak reference owned by
the strong references rather than an absence of weak handles.
…r, r=lqd,bjorn3

Refactor libproc_macro: remove * imports

This factors out (and goes a bit further) some of the work from rust-lang#157590 which I think can/should be merged independently of the wasm proc macros strategy, since it just makes it easier to read code in the bridge. It was confusing to get warnings/errors when commenting code that looked unused but was actually pulled in due to the `*` imports from other modules.

This also factors the panic message into a separate module since it's not really related to `rpc` in a direct sense.

Best reviewed by-commit.

r? bjorn3 since you've probably at least glanced at this code recently, but happy to re-roll if you'd prefer.
…t, r=joboet

alloc: clarify comment on ArcInner::weak lock sentinel

The comment on the `weak` field of `ArcInner` currently states that the `usize::MAX` sentinel locks "the ability to upgrade weak pointers or downgrade strong ones", and that this is used to avoid races in `make_mut` and `get_mut`. Both halves of that description are inaccurate.

`Weak::upgrade` never inspects the weak count, so the lock has no effect on it. The operation only CASes on the strong count and is happy to succeed while the weak count is locked. `Arc::make_mut` also does not participate in the locking protocol, and the function body already contains a comment noting that observing `usize::MAX` for the weak count there is impossible because only a thread holding a strong reference can take the lock.

The lock is actually only taken in `Arc::is_unique` (which backs `Arc::get_mut`), and the only operation that observes and waits on it is `Arc::downgrade`, which spins while `weak == usize::MAX` before attempting its CAS to create a new `Weak`.

This PR rewrites the comment to describe what the lock is and what it actually prevents.

Closes rust-lang#144296
@rust-bors rust-bors Bot added the rollup A PR which is a rollup label Jun 13, 2026
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Jun 13, 2026
@JonathanBrouwer

Copy link
Copy Markdown
Contributor Author

@bors r+ rollup=never p=5

@rust-bors

rust-bors Bot commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 1939d61 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 Jun 13, 2026
@rust-bors

This comment has been minimized.

@JonathanBrouwer

Copy link
Copy Markdown
Contributor Author

@bors treeopen

@rust-bors

rust-bors Bot commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

Tree is now open for merging.

@rust-bors rust-bors Bot added merged-by-bors This PR was explicitly merged by bors. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jun 13, 2026
@rust-bors

rust-bors Bot commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

☀️ Test successful - CI
Approved by: JonathanBrouwer
Duration: 3h 14m 56s
Pushing 8d6b380 to main...

@rust-bors rust-bors Bot merged commit 8d6b380 into rust-lang:main Jun 13, 2026
14 checks passed
@rustbot rustbot added this to the 1.98.0 milestone Jun 13, 2026
@rust-timer

Copy link
Copy Markdown
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#156787 alloc: clarify comment on ArcInner::weak lock sentinel 1c22a7512819ce3dab152d0badaa6266d83b21ad (link)
#157793 Refactor libproc_macro: remove * imports 895828051976cf4573569b30d32f382caeaa72a1 (link)

previous master: edff07ce1a

In the case of a perf regression, run the following command for each PR you suspect might be the cause: @rust-timer build $SHA

@github-actions

Copy link
Copy Markdown
Contributor
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 edff07c (parent) -> 8d6b380 (this PR)

Test differences

Show 418 test diffs

418 doctest diffs were found. These are ignored, as they are noisy.

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard 8d6b38095ef12416976655207031eeb4337df71b --output-dir test-dashboard

And then open test-dashboard/index.html in your browser to see an overview of all executed tests.

Job duration changes

  1. x86_64-gnu-stable: 1h 33m -> 2h 17m (+46.8%)
  2. x86_64-gnu-gcc-core-tests: 15m 23s -> 9m 27s (-38.6%)
  3. x86_64-msvc-1: 2h 11m -> 2h 52m (+31.7%)
  4. dist-x86_64-mingw: 2h 1m -> 2h 39m (+30.8%)
  5. dist-android: 22m 17s -> 28m 41s (+28.7%)
  6. dist-arm-linux-musl: 1h 18m -> 1h 40m (+28.6%)
  7. dist-sparcv9-solaris: 1h 14m -> 1h 34m (+27.3%)
  8. dist-arm-linux-gnueabi: 1h 9m -> 1h 27m (+24.9%)
  9. i686-msvc-1: 3h 7m -> 2h 21m (-24.8%)
  10. pr-check-1: 33m 8s -> 25m 19s (-23.6%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (8d6b380): comparison URL.

Overall result: ❌ regressions - no action needed

@rustbot label: -perf-regression

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
1.3% [1.3%, 1.3%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results (primary 6.9%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
6.9% [6.2%, 7.7%] 2
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 6.9% [6.2%, 7.7%] 2

Cycles

This perf run didn't have relevant results for this metric.

Binary size

Results (primary -0.0%, secondary -0.1%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.0% [-0.1%, -0.0%] 36
Improvements ✅
(secondary)
-0.1% [-0.1%, -0.0%] 23
All ❌✅ (primary) -0.0% [-0.1%, -0.0%] 36

Bootstrap: 519.155s -> 517.524s (-0.31%)
Artifact size: 400.88 MiB -> 400.85 MiB (-0.01%)

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

Labels

merged-by-bors This PR was explicitly merged by bors. rollup A PR which is a rollup T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants