no suggestion to enable const generics features
Open
@LaneAsade is already working on this.
Since Feb 16, 2026.
A-const-generics
C-bug
F-generic_const_parameter_types
T-compiler
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
struct Bar<T, const N: T>(T);
results in
error[E0770]: the type of const parameters must not depend on other generic parameters
--> src/lib.rs:1:24
|
1 | struct Bar<T, const N: T, const M: u64 = N>(T);
| ^ the type must not depend on the parameter `T`
For more information about this error, try `rustc --explain E0770`.
error: could not compile `playground` (lib) due to 1 previous error
It should suggest using feature(generic_const_parameter_types, adt_const_params) on nightly
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.