We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
#[target_feature(enable = "sha3")]
1 parent 0e0fb30 commit 0945c16Copy full SHA for 0945c16
1 file changed
keccak/src/lib.rs
@@ -56,8 +56,13 @@ impl Keccak {
56
pub fn with_backend(&self, f: impl BackendClosure) {
57
#[cfg(target_arch = "aarch64")]
58
if self.armv8_sha3.get() {
59
- // TODO: impl ARM backend
60
- return f.call_once::<SoftBakend>();
+ #[target_feature(enable = "sha3")]
+ fn aarch64_sha3_inner(f: impl BackendClosure) {
61
+ // TODO: impl arm backend
62
+ f.call_once::<SoftBakend>();
63
+ }
64
+ // SAFETY: we checked target feature availability above
65
+ return unsafe { aarch64_sha3_inner(f) };
66
}
67
f.call_once::<SoftBakend>();
68
0 commit comments