You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This code using derive_const (from #102049) doesn't compile because the expansion of the macro adds only a non ~const trait bount to the impl block. cc @fee1-dead playground
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
…lly-derive-const, r=fee1-dead
Make `derive_const` derive properly const-if-const impls
Fixesrust-lang#107774Fixesrust-lang#107666
Also fixes rendering of const-if-const bounds in pretty printing.
r? `@oli-obk` or `@fee1-dead`
…lly-derive-const, r=fee1-dead
Make `derive_const` derive properly const-if-const impls
Fixesrust-lang#107774Fixesrust-lang#107666
Also fixes rendering of const-if-const bounds in pretty printing.
r? ``@oli-obk`` or ``@fee1-dead``
This code using
derive_const
(from #102049) doesn't compile because the expansion of the macro adds only a non~const
trait bount to the impl block. cc @fee1-deadplayground
Using Compiler:
Compiler Output
Macro Expansion
The text was updated successfully, but these errors were encountered: