diff --git a/libafl/Cargo.toml b/libafl/Cargo.toml index 930383d93a..3c820ec845 100644 --- a/libafl/Cargo.toml +++ b/libafl/Cargo.toml @@ -30,7 +30,7 @@ llmp_debug = [] # Enables debug output for LLMP llmp_small_maps = [] # reduces initial map size for llmp [build-dependencies] -rustc_version = "0.4" +rustversion = "1.0" [dev-dependencies] criterion = "0.3" # Benchmarking diff --git a/libafl/build.rs b/libafl/build.rs new file mode 100644 index 0000000000..e9d3f5d9e9 --- /dev/null +++ b/libafl/build.rs @@ -0,0 +1,7 @@ +#[rustversion::nightly] +fn main() { + println!("cargo:rustc-cfg=unstable_feature"); +} + +#[rustversion::not(nightly)] +fn main() {} diff --git a/libafl/src/lib.rs b/libafl/src/lib.rs index 8717b14d92..8ce8d7df4e 100644 --- a/libafl/src/lib.rs +++ b/libafl/src/lib.rs @@ -3,7 +3,7 @@ Welcome to `LibAFL` */ #![cfg_attr(not(feature = "std"), no_std)] -#![cfg_attr(feature = "RUSTC_IS_NIGHTLY", feature(min_specialization))] +#![cfg_attr(unstable_feature, feature(specialization))] #![deny(rustdoc::broken_intra_doc_links)] #![deny(clippy::pedantic)] #![allow(