error[[E0277]](https://doc.rust-lang.org/nightly/error-index.html#E0277): can't compare `T` with `_` in const contexts
--> src/main.rs:5:23
|
4 | #[derive_const(PartialEq)]
| --------- in this derive macro expansion
5 | pub struct Reverse<T>(T);
| ^ no implementation for `T == _`
|
note: the trait `PartialEq<_>` is implemented for `T`, but that implementation is not `const`
--> src/main.rs:5:23
|
4 | #[derive_const(PartialEq)]
| --------- in this derive macro expansion
5 | pub struct Reverse<T>(T);
| ^
= note: this error originates in the derive macro `PartialEq` (in Nightly builds, run with -Z macro-backtrace for more info)
For more information about this error, try `rustc --explain E0277`.
error: could not compile `playground` due to previous error
This code using
derive_const(from #102049) doesn't compile because the expansion of the macro adds only a non~consttrait bount to the impl block. cc @fee1-deadplayground
Using Compiler:
Compiler Output
Macro Expansion