question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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).

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:1
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
lcnrcommented, 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
1reaction
varkorcommented, 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. https://github.com/rust-lang/rfcs/pull/2300, https://github.com/rust-lang/rfcs/pull/2591). Perhaps this is another such situation.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Const generics MVP hits beta! - Rust Blog
Const generics are generic arguments that range over constant values, rather than types or lifetimes. This allows, for instance, types to be ...
Read more >
Const Generics - Rust By Practice
Const generics are generic arguments that range over constant values, rather than types or lifetimes. This allows, for instance, types to be parameterized ......
Read more >
2000-const-generics - The Rust RFC Book
Const parameter (generic const): A const which a type or function is abstract over; this const is input to the concrete type of...
Read more >
It's Time to Get Hyped About Const Generics in Rust
Const Generics Reduce Runtime Complexity ... This is powerful, but the current implementation of const generics is quite limited, on purpose.
Read more >
Rust 1.51 Stabilizes Const Generics MVP, Improves Cargo ...
Const generics allow developers to define a variety of new generic types, but their implementations is not yet complete.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found