Skip to content

Commit

Permalink
[crypto] Check both backend features are not enabled simultaneously
Browse files Browse the repository at this point in the history
This would typically happen with somebody compiling with `--features "vanilla"` rather than `--features "vanilla" --no-default-features`.

This is a follow-up to aptos-labs#4970, which made a feature control how we load dalek dependencies, and aptos-labs#5126 and following, which enable the new resolver and therefore help features have real mutually-exclusive semantics.

Closes: aptos-labs#5230
Approved by: metajack
  • Loading branch information
huitseeker authored and bors-libra committed Jul 22, 2020
1 parent 08cca00 commit 17d9442
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions crypto/crypto/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,9 @@ compile_error!(
"no dalek arithmetic backend cargo feature enabled! \
please enable one of: fiat, vanilla"
);

#[cfg(all(feature = "fiat", feature = "vanilla"))]
compile_error!(
"at most one dalek arithmetic backend cargo feature should be enabled! \
please enable one of: fiat, vanilla"
);

0 comments on commit 17d9442

Please sign in to comment.