From 2960a9b4594fca6a2204350c18cc4d5b59c25b89 Mon Sep 17 00:00:00 2001 From: Omid Rad Date: Mon, 20 Oct 2025 12:11:30 +0200 Subject: [PATCH] Improve error messages for feature flags --- src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 920b996b..68a1c7d6 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -7,11 +7,11 @@ #[cfg(all(feature = "rust_crypto", feature = "aws_lc_rs"))] compile_error!( - "feature \"rust_crypto\" and feature \"aws_lc_rs\" cannot be enabled at the same time" + "Feature \"rust_crypto\" and \"aws_lc_rs\" are mutually exclusive and cannot be enabled at the same time" ); #[cfg(not(any(feature = "rust_crypto", feature = "aws_lc_rs")))] -compile_error!("at least one of the features \"rust_crypto\" or \"aws_lc_rs\" must be enabled"); +compile_error!("Exactly one of the \"rust_crypto\" or \"aws_lc_rs\" features must be enabled"); pub use algorithms::Algorithm; pub use decoding::{DecodingKey, TokenData, decode, decode_header};