Skip to content
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

const-generics #51

Open
nikomatsakis opened this issue Sep 3, 2020 · 6 comments
Open

const-generics #51

nikomatsakis opened this issue Sep 3, 2020 · 6 comments
Assignees
Labels
lang-initiative An active lang team initiative T-lang

Comments

@nikomatsakis
Copy link
Contributor

nikomatsakis commented Sep 3, 2020

Summary

Implement and design the const_generics feature with the initial goal of stabilizing the min_const_generics subset.

Info

What is this issue?

This issue represents an active project group. It is meant to be used for
the group to post updates to the lang team (and others) in a lightweight
fashion. Please do not use the comments here for discussion, that should be kept
in the Zulip stream (discussion comments here will be marked as off-topic).

@nikomatsakis nikomatsakis added lang-initiative An active lang team initiative T-lang labels Sep 3, 2020
@nikomatsakis
Copy link
Contributor Author

  • May be in code complete status, planning a meeting to go over and create a comprehensive test suite

@nikomatsakis
Copy link
Contributor Author

2020-10-26:

  • lcnr and I prepared a list of test cases last week.
  • What is the next procedural step?
    • Stabilization report seems appropriate but is not a great place for lasting documentation
    • RFC would be more visible but we don't really need the "comment requirement"

@varkor
Copy link
Member

varkor commented Oct 26, 2020

In the past, there have been various "procedural RFCs" that specify functionality that has already been deemed desirable, and therefore not required the full comment period (e.g. rust-lang/rfcs#2300, rust-lang/rfcs#2591). Perhaps this is another such situation.

@lcnr
Copy link
Contributor

lcnr commented Apr 7, 2021

2021-04-07:

news since the last update:

  • feature(min_const_generics) has been stabilized
  • we now have regular weekly meetings every tuesday
  • feature(const_generics_defaults) is now on nightly, allowing for
#![feature(const_generics_defaults)]
struct WithDefault<const N: usize = 3> {
    inner: [u8; N],
}

current topics:

  • complex generic const arguments, i.e. fn split_first<T, const N: usize>(arr: [T; N]) -> (T, [T; N - 1])
    • available on nightly using feature(const_evaluatable_checked) which is still quite broken
    • there are still some big design and implementation challenges
  • working towards allowing more const param types, such as fn foo<const CONFIG: Config>
  • working towards stabilization of some smaller improvements, see our meeting notes for more details

@lcnr
Copy link
Contributor

lcnr commented May 18, 2021

2021-05-18

  • working on a vision doc for const generics
  • experimenting with a hack to implement Default for generic arrays
  • const parameter defaults is getting close to being ready for stabilization
  • some (small) further work on complex generic const arguments and val trees(Use ValTree in all type level constants rust#83234) as well as the smaller improvements mentioned last time

@BoxyUwU
Copy link
Member

BoxyUwU commented Jul 6, 2021

2021-07-06

  • started a WIP document to help figure out structural equality (structural equality is a blocker for allowing more than just integers, char and bool as const param types)
  • various small fixes for const_generics_defaults made, would be a good idea to figure out if we can stabilise this now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lang-initiative An active lang team initiative T-lang
Projects
Status: Experimental
Development

No branches or pull requests

4 participants