Skip to content

Commit c291b23

Browse files
committed
Improve error messages for faulty flag combinations
1 parent c465771 commit c291b23

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/lib.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -481,6 +481,10 @@ compile_error!("`wasm-bindgen` cannot be used with `no-std`");
481481
#[cfg(feature = "stdweb")]
482482
compile_error!("`stdweb` cannot be used with `no-std`");
483483

484+
#[cfg(target_family = "wasm")]
485+
#[cfg(not(any(feature = "no_time", feature = "wasm-bindgen", feature = "stdweb")))]
486+
compile_error!("WASM targets have to use either the `wasm-bindgen`, `stdweb` or `no_time` feature");
487+
484488
#[cfg(target_family = "wasm")]
485489
#[cfg(feature = "no_std")]
486490
compile_error!("`no_std` cannot be used for WASM target");

0 commit comments

Comments
 (0)