#[derive_const]
derives should bound generic type parameters by ~const Trait
#107666
Labels
C-bug
Category: This is a bug.
#[derive_const]
derives do not introduce~const
bounds on generic parameters, preventing them from being used on most types with them.I tried this code:
I expected to see this happen: The code should compile, with the trait implementation looking like
impl<T> const Clone for X<T> where T: ~const Clone
.Instead, this happened: I get the following compilation errors:
Using
#[derive_const(PartialEq)]
and#[derive_const(Default)]
also causes compilation errors.Meta
rustc --version --verbose
:I could also reproduce this issue on the playground (1.69.0-nightly (2023-02-03 658fad6)).
The text was updated successfully, but these errors were encountered: