Skip to content

Commit

Permalink
Gracefully fail if use_std is not used
Browse files Browse the repository at this point in the history
Use `compile_error!` macro to issue a meaningful compile error if the `use_std` feature is not enabled.
  • Loading branch information
cipriancraciun committed May 19, 2018
1 parent eeffc7f commit dec6819
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -521,6 +521,11 @@ another matching engine with fixed memory requirements.
#![cfg_attr(test, deny(warnings))]
#![cfg_attr(feature = "pattern", feature(pattern))]


#[cfg(not(feature = "use_std"))]
compile_error!("`use_std` feature is currently required to build this crate");


extern crate aho_corasick;
extern crate memchr;
extern crate thread_local;
Expand Down

0 comments on commit dec6819

Please sign in to comment.