Skip to content

Implement cromulent Copy closure captures - #163717

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

Jules-Bertholet wants to merge 2 commits 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 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 3 times, most recently from 9790b9f to 1ddfd18 Compare October 6, 2026 14:20
@mejrs

mejrs commented Oct 6, 2026

Copy link
Copy Markdown
Member

@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
@rust-bors

rust-bors Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: 83e3885 (83e388551a68240a8add01574724ea840a7bbc2a)
Base parent: 8d1a764 (8d1a76430406c877b35d0b627e7f796dcf0dfeca)

@mejrs

mejrs commented Oct 7, 2026

Copy link
Copy Markdown
Member

@craterbot check

@craterbot

Copy link
Copy Markdown
Collaborator

👌 Experiment pr-163717 created and queued.
🤖 Automatically detected try build 83e3885
⚠️ Try build based on commit 1ddfd18, but latest commit is 7247983. Did you forget to make a new try build?
🔍 You can check out the queue and this experiment's details.

ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@craterbot craterbot added S-waiting-on-crater Status: Waiting on a crater run to be completed. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Oct 7, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Oct 7, 2026
…=Kobzol

Remove redundant closure in bootstrap

My PR rust-lang#163717 would make Clippy start linting `redundant_closure_for_method_calls` here; let's get ahead of that.

@rustbot label T-bootstrap
@rustbot ready

r? bootstrap
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Oct 7, 2026
…=Kobzol

Remove redundant closure in bootstrap

My PR rust-lang#163717 would make Clippy start linting `redundant_closure_for_method_calls` here; let's get ahead of that.

@rustbot label T-bootstrap
@rustbot ready

r? bootstrap
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Oct 7, 2026
…=Kobzol

Remove redundant closure in bootstrap

My PR rust-lang#163717 would make Clippy start linting `redundant_closure_for_method_calls` here; let's get ahead of that.

@rustbot label T-bootstrap
@rustbot ready

r? bootstrap
rust-bors Bot pushed a commit that referenced this pull request Oct 7, 2026
Rollup merge of #163905 - Jules-Bertholet:bootstrap-tweak, r=Kobzol

Remove redundant closure in bootstrap

My PR #163717 would make Clippy start linting `redundant_closure_for_method_calls` here; let's get ahead of that.

@rustbot label T-bootstrap
@rustbot ready

r? bootstrap
@rust-bors

This comment has been minimized.

@Jules-Bertholet
Jules-Bertholet force-pushed the cromulent-copy-closure-captures branch 2 times, most recently from 641f34a to 10eb649 Compare October 8, 2026 01:49
github-actions Bot pushed a commit to rust-lang/stdarch that referenced this pull request Oct 8, 2026
Remove redundant closure in bootstrap

My PR rust-lang/rust#163717 would make Clippy start linting `redundant_closure_for_method_calls` here; let's get ahead of that.

@rustbot label T-bootstrap
@rustbot ready

r? bootstrap
@@ -13,7 +13,7 @@
#[no_mangle]
pub fn vec_append_with_temp_alloc(dst: &mut Vec<u8>, src: &[u8]) {

@Jules-Bertholet Jules-Bertholet Oct 8, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-crater Status: Waiting on a crater run to be completed. 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.

7 participants