Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The
unexpected_cfgs
lint was previously disabled in 9252fa5. Since the lint can now be configured usingCargo.toml
1 nobuild.rs
shenanigans are necessary anymore.This PR also fixes some immediate bugs found, two tests used comma-seperated config flags
cfg(target_feature = "avx512ifma,avx512vl")
, which is invalid (and always false). Instead, it should becfg(all(target_feature = "avx512ifma", target_feature = "avx512vl"))
.From what I've seen, this pattern also exists in the proc-macros used to enable target features for certain functions. But I don't understand the codebase well enough to say this for certain, and I didn't look too much into it either.
I believe usage
cfg(nightly)
is also a bug - the documentation2 seems to suggest that features are automatically enabled when compiledThis is incorrect, since
cfg(nightly)
does not exist, and AFAIK there is no way to detect whether code is being compiled by a "nightly" compiler (and the definition of "nightly" changes all the time anyways). But perhaps this was intended to be used manually? (via--cfg nightly
)Footnotes
https://blog.rust-lang.org/2024/05/06/check-cfg.html#expecting-custom-cfgs ↩
https://docs.rs/curve25519-dalek/latest/curve25519_dalek/#simd-backend ↩