Skip to content

Tracking Issue for closures in const contexts #106003

Open

Description

@fee1-dead

This is a tracking issue for declaring const closures.
The feature gate for the issue is #![feature(const_closures)].

About tracking issues

Tracking issues are used to record the overall progress of implementation.
They are also used as hubs connecting to other relevant issues, e.g., bugs or open design questions.
A tracking issue is however not meant for large scale discussion, questions, or bug reports about a feature.
Instead, open a dedicated issue for the specific matter and add the relevant feature gate label.

Steps

Unresolved Questions

  • for<'a> const static async move || {} (keyword order?)

Implementation history

Activity

  1. added
    C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFC
    on Dec 21, 2022
  2. Jerrody commented on Dec 22, 2022

    @Jerrody
    Contributor

    Unresolved Questions

    • const static async move || {} (keyword order?)

    In my opinion, suggested keyword order is good.

  3. added a commit that references this issue on Jan 13, 2023
  4. dtolnay commented on Jan 16, 2023

    @dtolnay
    Member

    Unresolved Questions

    • for<'a> const static async move || {} (keyword order?)

    Data point: const async fn f() {} is the order accepted for function definitions, so we should ensure at minimum the relative order of const–async is consistent.

  5. jhpratt commented on Jan 19, 2023

    @jhpratt
  6. jasper310899 commented on Jul 12, 2025

    @jasper310899

    Now with the Fn trait constified this seems possible, right?

  7. oli-obk commented on Jul 12, 2025

    @oli-obk
    Contributor

    Yes, but it needs significant work and possibly a redesign from scratch. Unsure, but it's def more than a few days of work, considering I worked on it for a day and didn't get very far in even understanding the full situation. I'll post my status as a PR as it's an improvement to the currently broken feature, but it still may require getting ripped out and done over

  8. added a commit that references this issue on Aug 19, 2025
  9. added 2 commits that reference this issue on Sep 8, 2025
  10. added a commit that references this issue on Oct 9, 2025
  11. added a commit that references this issue on Mar 13, 2026
  12. added a commit that references this issue on Mar 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-const-evalArea: Constant evaluation, covers all const contexts (static, const fn, ...)C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFC

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions