Skip to content

Gate static closures behind a parser feature #145604

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 22, 2025

Conversation

compiler-errors
Copy link
Member

I'd like to gate static || closures behind a feature gate, since we shouldn't allow people to take advantage of this syntax if it's currently unstable. Right now, since it's only rejected after ast lowering, it's accessible to macros.

Let's crater this to see if we can claw it back without breaking anyone's code.

@compiler-errors
Copy link
Member Author

@bors2 try

@rustbot

This comment was marked as outdated.

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Aug 19, 2025
@rustbot
Copy link
Collaborator

rustbot commented Aug 19, 2025

⚠️ Warning ⚠️

rust-bors bot added a commit that referenced this pull request Aug 19, 2025
Gate static closures behind a parser feature
@rust-bors

This comment has been minimized.

@fmease
Copy link
Member

fmease commented Aug 19, 2025

r=me if crater results look good (they should); no T-lang input necessary imho

@fmease fmease 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-review Status: Awaiting review from the assignee but also interested parties. labels Aug 19, 2025
@rust-bors
Copy link

rust-bors bot commented Aug 19, 2025

☀️ Try build successful (CI)
Build commit: 2b43d8e (2b43d8e161cfe46fae25518efb124c3c1d0fa392, parent: 8365fcb2b840c95eeb0bc377af8bd498fad22245)

@compiler-errors
Copy link
Member Author

@craterbot check

1 similar comment
@fmease
Copy link
Member

fmease commented Aug 19, 2025

@craterbot check

@craterbot
Copy link
Collaborator

👌 Experiment pr-145604 created and queued.
🤖 Automatically detected try build 2b43d8e
🔍 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 Aug 19, 2025
@craterbot
Copy link
Collaborator

🚧 Experiment pr-145604 is now running

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

@fmease
Copy link
Member

fmease commented Aug 21, 2025

(I get 504 Gateway Time-out from crater.rust-lang.org)

@craterbot ping

@craterbot
Copy link
Collaborator

🎉 Experiment pr-145604 is completed!
📊 3 regressed and 7 fixed (685389 total)
📰 Open the summary report.

⚠️ If you notice any spurious failure please add them to the denylist!
ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@craterbot craterbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-crater Status: Waiting on a crater run to be completed. labels Aug 21, 2025
@fmease
Copy link
Member

fmease commented Aug 21, 2025

All regressions are spurious.

@fmease
Copy link
Member

fmease commented Aug 21, 2025

@bors r+ rollup (no T-lang input necessary)

@bors
Copy link
Collaborator

bors commented Aug 21, 2025

📌 Commit db0c825 has been approved by fmease

It is now in the queue for this repository.

@bors bors 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 21, 2025
@fmease fmease added the relnotes Marks issues that should be documented in the release notes of the next release. label Aug 21, 2025
@lqd
Copy link
Member

lqd commented Aug 21, 2025

All regressions are spurious.

Surely this change is fine, but crater is still partially broken: 178K crates were not tested in this run :/

bors added a commit that referenced this pull request Aug 21, 2025
Rollup of 16 pull requests

Successful merges:

 - #137494 (libstd: init(): dup() subsequent /dev/nulls instead of opening them again)
 - #144541 (c-variadic: multiple ABIs in the same program for arm)
 - #144613 (aarch64-nintendo-switch-freestanding - Enable CPU features that are always available in a live system (crypto instructions, plus explicit NEON).)
 - #144780 (Add a method to dump MIR in the middle of MIR building)
 - #145137 (Consolidate panicking functions in `slice/index.rs`)
 - #145507 (Refactor attribute parsing to improve ergonomics and some diagnostics)
 - #145604 (Gate static closures behind a parser feature)
 - #145648 (Add two tidy dependency checks)
 - #145661 (update some s390x codegen tests)
 - #145672 (Instantiate higher-ranked binder with erased when checking `IntoIterator` predicate for query instability)
 - #145689 (Migrate `panic_unwind` to use `cfg_select!`)
 - #145700 (Handle `ReEarlyParam` in `type_name`.)
 - #145703 (Remove MIPS targets from CI LLVM platforms)
 - #145704 (ci: don't cleanup windows disk)
 - #145705 (remove an `as` cast in prefetch codegen)
 - #145712 (Update outdated link in bound region comments)

r? `@ghost`
`@rustbot` modify labels: rollup
@fmease
Copy link
Member

fmease commented Aug 21, 2025

178K crates were not tested in this run :/

It's quite unfortunate but not specific to this PR / crater run.

That's been the case for the last 6+ (12+ ?) months IINM. E.g., https://crater-reports.s3.amazonaws.com/pr-145605/index.html, https://crater-reports.s3.amazonaws.com/pr-145463/index.html, https://crater-reports.s3.amazonaws.com/pr-144386/index.html, https://crater-reports.s3.amazonaws.com/pr-142134-abi-ast-error/index.html.

Prior to some crater patch from maybe 6 months ago that introduced prepare-fail, such failures were simply grouped under error, see e.g. https://crater-reports.s3.amazonaws.com/pr-138952/index.html.

See also https://rust-lang.zulipchat.com/#narrow/channel/242791-t-infra/topic/crater.3A.20.3E100k.20.22prepare-fail.22.20crates.3F/with/526256937.

@bors bors merged commit f49d690 into rust-lang:master Aug 22, 2025
11 checks passed
@rustbot rustbot added this to the 1.91.0 milestone Aug 22, 2025
rust-timer added a commit that referenced this pull request Aug 22, 2025
Rollup merge of #145604 - compiler-errors:static-closure, r=fmease

Gate static closures behind a parser feature

I'd like to gate `static ||` closures behind a feature gate, since we shouldn't allow people to take advantage of this syntax if it's currently unstable. Right now, since it's only rejected after ast lowering, it's accessible to macros.

Let's crater this to see if we can claw it back without breaking anyone's code.
github-actions bot pushed a commit to rust-lang/miri that referenced this pull request Aug 22, 2025
Rollup of 16 pull requests

Successful merges:

 - rust-lang/rust#137494 (libstd: init(): dup() subsequent /dev/nulls instead of opening them again)
 - rust-lang/rust#144541 (c-variadic: multiple ABIs in the same program for arm)
 - rust-lang/rust#144613 (aarch64-nintendo-switch-freestanding - Enable CPU features that are always available in a live system (crypto instructions, plus explicit NEON).)
 - rust-lang/rust#144780 (Add a method to dump MIR in the middle of MIR building)
 - rust-lang/rust#145137 (Consolidate panicking functions in `slice/index.rs`)
 - rust-lang/rust#145507 (Refactor attribute parsing to improve ergonomics and some diagnostics)
 - rust-lang/rust#145604 (Gate static closures behind a parser feature)
 - rust-lang/rust#145648 (Add two tidy dependency checks)
 - rust-lang/rust#145661 (update some s390x codegen tests)
 - rust-lang/rust#145672 (Instantiate higher-ranked binder with erased when checking `IntoIterator` predicate for query instability)
 - rust-lang/rust#145689 (Migrate `panic_unwind` to use `cfg_select!`)
 - rust-lang/rust#145700 (Handle `ReEarlyParam` in `type_name`.)
 - rust-lang/rust#145703 (Remove MIPS targets from CI LLVM platforms)
 - rust-lang/rust#145704 (ci: don't cleanup windows disk)
 - rust-lang/rust#145705 (remove an `as` cast in prefetch codegen)
 - rust-lang/rust#145712 (Update outdated link in bound region comments)

r? `@ghost`
`@rustbot` modify labels: rollup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
relnotes Marks issues that should be documented in the release notes of the next release. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler 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