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
Looking at the output of cargo asm on my application I can see function calls being generated from the nonzero macro
We could possibly add an #[inline(always)] but I dont think that will necessarily be enough, there might be more logic included.
To ensure it is actually zero cost we will need to make the macro generate code within a const context via rust-lang/rust#76001 once that is stabilized.
The text was updated successfully, but these errors were encountered:
...oh noooo. Thanks for finding this & bringing it up!
Inlining sounds reasonable. Don't think we can do a const block in any case, because it needs to call a trait method, so until those can be const, I think inlining will be the best we can do. /:
I'd be happy to merge a PR & roll a release with this.
Looking at the output of

cargo asm
on my application I can see function calls being generated from the nonzero macroWe could possibly add an #[inline(always)] but I dont think that will necessarily be enough, there might be more logic included.
To ensure it is actually zero cost we will need to make the macro generate code within a const context via rust-lang/rust#76001 once that is stabilized.
The text was updated successfully, but these errors were encountered: