Skip to content

Tracking Issue for min_const_generics #74878

Closed

Description

@lcnr

This is a tracking issue for the minimal usable subset of RFC 2000 (rust-lang/rfcs#2000).
The feature gate for the issue is #![feature(min_const_generics)].

See rust-lang/lang-team#37 for more details.

About tracking issues

Tracking issues are used to record the overall progress of implementation.
They are also uses 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

Completed:

Implementation history

Activity

  1. added
    C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFC
    A-const-genericsArea: const generics (parameters and arguments)
    T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
    T-langRelevant to the language team
    on Jul 28, 2020
  2. changed the title [-]Tracking Issue for `min_const_generics[/-] [+]Tracking Issue for `min_const_generics`[/+] on Jul 28, 2020
  3. locked and limited conversation to collaborators on Jul 28, 2020
  4. unlocked this conversation on Jul 29, 2020
  5. alex commented on Aug 13, 2020

    @alex
    Member

    👋 I'm trying to understand the limitations of min_const_generics. Is it expected that https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=59cca2f3891e9fa921afdcbcda9f2588 compiles ok without min_const_generics, but fails with it?

  6. lcnr commented on Aug 13, 2020

    @lcnr
    ContributorAuthor

    😐 min_const_generics should not cause breaking changes, that's a bug. Opened #75486

    We will most probably write a more detailed summary of what will be allowed with this feature in the near future, for now I can recommend the post by @withoutboats about this: https://without.boats/blog/shipping-const-generics/

    In general, please note that a tracking issue is not meant for large scale discussion, questions, or bug reports about a feature.
    Instead, open a dedicated issue for the specific matter.

    Feel free to ping @lcnr (me) when opening a new issue concerning this feature.

  7. bstrie commented on Sep 13, 2020

    @bstrie
    Contributor

    Regarding some of the steps listed here:

    • For "const wf (generic params in associated consts)", what is the issue? Implement the min_const_generics feature gate #74877 specifically calls out that const ASSOC: usize = 64 / N; should work, so is this step about discussing whether or not it should be stabilized, or is it calling out something that hasn't been implemented yet? Can someone with more background open an issue that we can link to?
    • For the second step, can it be checked off now that make ConstEvaluatable more strict #74595 is merged?
    • For "fix remaining blocking issues", do we have a list of these, or at least a vague upper bound on how many issues might exist? The F-min_const_generics label only lists three issues including this one, are either of the other two blocking?
  8. varkor commented on Sep 13, 2020

    @varkor
    Contributor

    I'm going to go through and triage the issues for F-min_const_generics soon, so we can get a better picture of what's remaining.

  9. varkor commented on Oct 1, 2020

    @varkor
    Contributor

    I've added several labels, and come up with a system to help us track what remains. It's slightly complicated, because we need to track three versions of Rust essentially: nightly, #![feature(min_const_generics)], and #![feature(const_generics)], which can all behave differently.

    • const-generics-blocking tracks any bug or non-diagnostics issue that is important enough that it ought to block stabilisation of min_const_generics (we can later reuse this label for const_generics).
    • const-generics-bad-diagnostics tracks issues where we emit unhelpful diagnostics that make const generics more difficult to use. I think these should be addressed before stabilisation of min_const_generics (at least where they make sense for min_const_generics).
    • const-generics-fixed-by-min_const_generics is a bug that occurs with or without a const_generics feature flag, which behaves correctly after enabling min_const_generics.
    • const-generics-fixed-by-const_generics is a bug that is fixed by enabling const_generics.

    If an issue is marked with const-generics-fixed-by-min_const_generics and E-needs-test, we need to add a test for it under #[feature(min_const_generics)]. After adding the test, we can remove E-needs-test. If the test already works on nightly, then we can also remove const-generics-fixed-by-min_const_generics.

    If an issue is marked with const-generics-fixed-by-const_generics and E-needs-test, we need to add a test for it under #[feature(const_generics)]. After adding the test, we can remove E-needs-test.

    In summary, after addressing E-needs-test, if the issue still occurs on nightly or under #![feature(const_generics)], don't close the issue.


    I'll try to deal with the current E-needs-test issues now, so no-one has to deal with my overly complicated labelling system immediately.

  10. varkor commented on Oct 2, 2020

    @varkor
    Contributor

    Regarding the remaining steps: there are only a handful of issues I think are blocking min_const_generics at this stage (several of which already have open pull requests). We also want to add many more tests, which is something anyone can easily help with. If you want to tackle one of the issues, feel free to ask @lcnr or myself how to get started; I'm going to dedicate time to fixing whichever remain.

    I'm not sure if anything remains to be done with the WF bullet point: perhaps @lcnr could clarify?

  11. 2 remaining items

  12. jacobchrismarsh commented on Oct 13, 2020

    @jacobchrismarsh

    If you want to tackle one of the issues, feel free to ask @lcnr or myself how to get started;

    @lcnr and @varkor, I'd love to help out on this. Where can I start?

  13. varkor commented on Oct 21, 2020

    @varkor
    Contributor

    @jacobchrismarsh: thanks for offering (and sorry for taking so long to reply: it's been really busy on my end recently)! We seem to be wrapping up F-min_const_generics at the moment (all the existing issues have open PRs), so the last big thing remaining is improving the test suite coverage for the feature. We're going to plan out what kind of things we need to have tests for, and we can let you know when that's ready: we'd be eager to have help writing tests.

    If you're keen to fix some bugs now, there are still a number of (non-min_)const_generics issues left. I think most of the bugs will require a little bit of investigation to fix, but there are still a few easier ones. Some examples are #75763, #65349 (for which there's an old PR you could revive and fix up), and #61414. But feel free to take a look at any of the issues and comment there, and I'll try to give you pointers on how to get started!

  14. est31 commented on Nov 4, 2020

    @est31
    Member

    Re the test coverage point, there is a tracking issue now for it: #78433

  15. mark-i-m commented on Nov 13, 2020

    @mark-i-m
    Contributor

    #78433 is now complete 🎉

  16. added a commit that references this issue on Dec 27, 2020
  17. alex commented on Dec 28, 2020

    @alex
    Member

    This is now stable on the latest nightly.

  18. joshtriplett commented on Jan 19, 2021

    @joshtriplett
    Member

    We discussed this in the @rust-lang/lang meeting today, and we feel that this feature warrants a Rust blog post. Would one of the const-generics team members be up for writing that post?

  19. lcnr commented on Jan 19, 2021

    @lcnr
    ContributorAuthor

    yes, I still intend to write a post for when this feature hits beta.

  20. added this to the 1.51.0 milestone on Nov 18, 2021
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-genericsArea: const generics (parameters and arguments)C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCF-const_generics`#![feature(const_generics)]`T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.T-langRelevant to the language team

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions