Skip to content

Implement cromulent Copy closure captures - #163717

Draft
Jules-Bertholet wants to merge 1 commit into
rust-lang:mainfrom
Jules-Bertholet:cromulent-copy-closure-captures
Draft

Jules-Bertholet wants to merge 1 commit into
rust-lang:mainfrom
Jules-Bertholet:cromulent-copy-closure-captures

Conversation

@Jules-Bertholet

@Jules-Bertholet Jules-Bertholet commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

View all comments

Implements rust-lang/rfcs#4011.

@rustbot label T-lang A-closures needs-fcp

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-clippy Relevant to the Clippy team. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. A-closures Area: Closures (`|…| { … }`) needs-fcp This change is insta-stable, or significant enough to need a team FCP to proceed. T-lang Relevant to the language team labels Oct 3, 2026
@rust-log-analyzer

This comment has been minimized.

@Jules-Bertholet
Jules-Bertholet force-pushed the cromulent-copy-closure-captures branch 2 times, most recently from d0c48eb to 61b2dc2 Compare October 3, 2026 20:36
@rustbot rustbot added the T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) label Oct 3, 2026
@rust-log-analyzer

This comment has been minimized.

@Jules-Bertholet
Jules-Bertholet force-pushed the cromulent-copy-closure-captures branch from 61b2dc2 to 8cf8a71 Compare October 3, 2026 21:55
@rust-log-analyzer

This comment has been minimized.

@Jules-Bertholet
Jules-Bertholet force-pushed the cromulent-copy-closure-captures branch from 8cf8a71 to cc5b2e6 Compare October 3, 2026 22:40
@rust-log-analyzer

This comment has been minimized.

@Jules-Bertholet
Jules-Bertholet force-pushed the cromulent-copy-closure-captures branch 3 times, most recently from cdb0b2a to aa1f01a Compare October 4, 2026 04:24
@rust-log-analyzer

This comment has been minimized.

@Jules-Bertholet
Jules-Bertholet force-pushed the cromulent-copy-closure-captures branch 3 times, most recently from 40c8217 to 44bd89c Compare October 4, 2026 15:27
@rust-log-analyzer

This comment has been minimized.

@Jules-Bertholet
Jules-Bertholet force-pushed the cromulent-copy-closure-captures branch 3 times, most recently from 03e2c32 to 2a3a2e0 Compare October 4, 2026 19:20
@rust-log-analyzer

This comment has been minimized.

@Jules-Bertholet
Jules-Bertholet force-pushed the cromulent-copy-closure-captures branch 2 times, most recently from 59ad213 to 818ec01 Compare October 4, 2026 21:42
@rust-log-analyzer

This comment has been minimized.

@Jules-Bertholet
Jules-Bertholet force-pushed the cromulent-copy-closure-captures branch 3 times, most recently from bd09b06 to 3553c7c Compare October 5, 2026 23:27
@rust-log-analyzer

This comment has been minimized.

@clarfonthey

Copy link
Copy Markdown
Contributor

@bors try
@rust-timer queue

@rust-timer

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Oct 6, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Oct 6, 2026
…es, r=<try>

Implement cromulent Copy closure captures
@rust-log-analyzer

This comment has been minimized.

@Jules-Bertholet
Jules-Bertholet force-pushed the cromulent-copy-closure-captures branch from 9a0c561 to 015efaa Compare October 6, 2026 02:00
@clarfonthey

Copy link
Copy Markdown
Contributor

@bors try

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Oct 6, 2026
…es, r=<try>

Implement cromulent Copy closure captures
@Jules-Bertholet

Copy link
Copy Markdown
Contributor Author

@clarfonthey fyi, there was no need to restart the build, I only made a change to rust-analyzer. (And might make some more)

@clarfonthey

Copy link
Copy Markdown
Contributor

Yeah, my bad, I misread what had actually happened. Didn't lose a lot of time at least.

@rust-log-analyzer

This comment has been minimized.

@rust-bors

rust-bors Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: 5692858 (5692858f685c960610bef733616eeec75920fa40)
Base parent: db23a2d (db23a2d392783030c008a5fafbe6cb139d1f7707)

@rust-timer

This comment has been minimized.

@Jules-Bertholet
Jules-Bertholet force-pushed the cromulent-copy-closure-captures branch from 015efaa to 9862c93 Compare October 6, 2026 03:12
@rust-log-analyzer

This comment has been minimized.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (5692858): comparison URL.

Overall result: ❌✅ regressions and improvements - please read:

Benchmarking means the PR may be perf-sensitive. It's automatically marked not fit for rolling up. Overriding is possible but disadvised: it risks changing compiler perf.

Next, please: If you can, justify the regressions found in this try perf run in writing along with @rustbot label: +perf-regression-triaged. If not, fix the regressions and do another perf run. Neutral or positive results will clear the label automatically.

@bors rollup=never rustc-perf
@rustbot label: -S-waiting-on-perf +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)
1.0% [0.3%, 1.7%] 2
Regressions ❌
(secondary)
0.9% [0.0%, 1.6%] 12
Improvements ✅
(primary)
-0.7% [-5.0%, -0.2%] 261
Improvements ✅
(secondary)
-0.8% [-6.8%, -0.1%] 214
All ❌✅ (primary) -0.6% [-5.0%, 1.7%] 263

Max RSS (memory usage)

Results (primary -2.0%, secondary -1.8%)

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

mean range count
Regressions ❌
(primary)
3.0% [2.4%, 3.6%] 2
Regressions ❌
(secondary)
3.2% [2.1%, 4.2%] 2
Improvements ✅
(primary)
-2.7% [-6.3%, -0.8%] 15
Improvements ✅
(secondary)
-3.2% [-6.0%, -0.5%] 7
All ❌✅ (primary) -2.0% [-6.3%, 3.6%] 17

Cycles

Results (primary -2.2%, secondary -4.7%)

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

mean range count
Regressions ❌
(primary)
3.4% [2.1%, 4.6%] 2
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-3.2% [-5.6%, -1.3%] 11
Improvements ✅
(secondary)
-4.7% [-6.6%, -3.8%] 8
All ❌✅ (primary) -2.2% [-5.6%, 4.6%] 13

Binary size

Results (primary 0.1%, secondary -0.3%)

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

mean range count
Regressions ❌
(primary)
0.4% [0.1%, 1.1%] 19
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.3% [-0.9%, -0.0%] 17
Improvements ✅
(secondary)
-0.3% [-0.5%, -0.0%] 13
All ❌✅ (primary) 0.1% [-0.9%, 1.1%] 36

Bootstrap: 489.541s -> 492.774s (0.66%)
Artifact size: 408.63 MiB -> 408.96 MiB (0.08%)

@rustbot rustbot added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Oct 6, 2026
@Jules-Bertholet
Jules-Bertholet force-pushed the cromulent-copy-closure-captures branch 2 times, most recently from 0549f87 to 9790b9f Compare October 6, 2026 13:57
@Jules-Bertholet
Jules-Bertholet force-pushed the cromulent-copy-closure-captures branch from 9790b9f to 1ddfd18 Compare October 6, 2026 14:20

This branch has not been deployed

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

Labels

A-closures Area: Closures (`|…| { … }`) needs-fcp This change is insta-stable, or significant enough to need a team FCP to proceed. perf-regression Performance regression. 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-clippy Relevant to the Clippy team. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-lang Relevant to the language team T-rust-analyzer Relevant to the rust-analyzer 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