Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

limb: Unmerge usize_from_u32 import from "alloc"-guarded use #2214

Merged
merged 1 commit into from
Jan 12, 2025

Conversation

MarijnS95
Copy link
Contributor

Since commit e88750b ("Define native word size as constant_time::Word.") usize_from_u32() is unconditionally used in and via global consts but was (likely accidentally by means of rust-analyzer) merged into a use statement that's guarded by feature = "alloc". When compiling this crate without that feature, which happens with default-features = false, this fails to compile due to missing the import.

Moving the import to the unguarded use crate:: group solves this.

Copy link

codecov bot commented Jan 10, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.04%. Comparing base (8d7a6f8) to head (f763748).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2214   +/-   ##
=======================================
  Coverage   97.04%   97.04%           
=======================================
  Files         161      161           
  Lines       20388    20388           
  Branches      458      458           
=======================================
+ Hits        19785    19786    +1     
  Misses        495      495           
+ Partials      108      107    -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@briansmith
Copy link
Owner

Please rebase this on the main branch as some build configuration changes were made that will fix the CI failures.

Since commit e88750b ("Define native word size as
`constant_time::Word`.") `usize_from_u32()` is unconditionally used
in and via global `const`s but was (likely accidentally by means
of `rust-analyzer`) merged into a `use` statement that's guarded by
`feature = "alloc"`.  When compiling this crate without that feature,
which happens with `default-features = false`, this fails to compile due
to missing the import.

Moving the import to the unguarded `use crate::` group solves this.
@MarijnS95 MarijnS95 force-pushed the compile-without-alloc branch from 941f85e to f763748 Compare January 12, 2025 20:50
@MarijnS95
Copy link
Contributor Author

@briansmith ✔️ done.

@briansmith briansmith merged commit 7476129 into briansmith:main Jan 12, 2025
147 checks passed
@MarijnS95 MarijnS95 deleted the compile-without-alloc branch January 12, 2025 23:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants