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
The following code produces errors. These errors are both nonsensical and unexpected. This happens with feature(associated_const_equality) enabled or disabled, and both on nightly and stable.
I am not going to post the error message again, as they are basically the same.
The current workaround that I have found is to wrap the constant value in {}, with will cause the code to compile on nightly with feature(associated_const_equality) enabled, or produce the associated const equality is incomplete error message otherwise.
It is expected that you need to wrap Mode::Cool with {}, as all const expressions beyond simple variable names require that. The error message could certainly be better though.
The following code produces errors. These errors are both nonsensical and unexpected. This happens with
feature(associated_const_equality)
enabled or disabled, and both on nightly and stable.Errors:
These errors appear to happen whenever a constant value is used instead of a literal.
Another example with constant variable instead of an enum variant.
I am not going to post the error message again, as they are basically the same.
The current workaround that I have found is to wrap the constant value in
{}
, with will cause the code to compile on nightly withfeature(associated_const_equality)
enabled, or produce theassociated const equality is incomplete
error message otherwise.Meta
rustc --version --verbose
:The text was updated successfully, but these errors were encountered: