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 PR #33460added something, which is good, but it also introduces problems with library authors who want to provide support (or don't want to provide support) for those platforms.
Right now I only use it when the outcome of a calculation could theoretically be larger than the 32 bit address space, when converting u64 values to usize, as rust up to now only supported platforms with at least 32 bits.
Now it seems I'll have to add it to u32 -> usize conversions as well.
In order for me to do the transition some #![forbid(downcast_to_usize)] like feature would be nice, otherwise I'd miss something.
Also that feature would help library authors who wish to not support 16 bit architectures (due to the additional maintenance burden because now they had to watch every usize downcast) to simply add such a #![forbid(downcast_to_usize)] to their code, and it stops from compiling.
Its always better to have code not compile than having to explain things in the docs.
The text was updated successfully, but these errors were encountered:
The PR #33460 added something, which is good, but it also introduces problems with library authors who want to provide support (or don't want to provide support) for those platforms.
In my code I have added a macro:
Its very useful and nice.
Right now I only use it when the outcome of a calculation could theoretically be larger than the 32 bit address space, when converting u64 values to usize, as rust up to now only supported platforms with at least 32 bits.
Now it seems I'll have to add it to u32 -> usize conversions as well.
In order for me to do the transition some
#![forbid(downcast_to_usize)]
like feature would be nice, otherwise I'd miss something.Also that feature would help library authors who wish to not support 16 bit architectures (due to the additional maintenance burden because now they had to watch every usize downcast) to simply add such a
#![forbid(downcast_to_usize)]
to their code, and it stops from compiling.Its always better to have code not compile than having to explain things in the docs.
The text was updated successfully, but these errors were encountered: