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
We can use newly available const fn designation to define new methods for all these types. These methods, since const can be used in the definition of constants. With inner value non-public it can not be accessed, which would require all necessary arithmetic methods to be defined in the impls of these types. (stratisd cheats in a few places by dereferencing the inner value and using raw arithmetic where the operation desired is not available.)
The text was updated successfully, but these errors were encountered:
I did a little experiment with this, but it seems that macro_attr generates a hidden and unusable new. Somehow, when I add a new function, there is a conflict with a previous definition.
We should consider dropping our dependence on macro_attr entirely. It can only provide, correctly, a subset of the operations we want, so the rest must be made by hand anyway. If all were made by hand, the structure would possibly be simpler. We would also get rid of the dependency on newtype_derive which was probably a mistake in the first place.
We can use newly available
const
fn designation to definenew
methods for all these types. These methods, sinceconst
can be used in the definition of constants. With inner value non-public it can not be accessed, which would require all necessary arithmetic methods to be defined in the impls of these types. (stratisd cheats in a few places by dereferencing the inner value and using raw arithmetic where the operation desired is not available.)The text was updated successfully, but these errors were encountered: