2017-11-24 19:28:43 +01:00
|
|
|
extern crate version_check;
|
|
|
|
|
2017-10-26 15:12:23 +02:00
|
|
|
fn main() {
|
2018-05-10 01:27:31 +02:00
|
|
|
let mut has_impl_trait = true;
|
|
|
|
|
|
|
|
match version_check::is_min_version("1.26.0") {
|
|
|
|
Some((true, _)) => println!("cargo:rustc-cfg=actix_impl_trait"),
|
|
|
|
_ => (),
|
|
|
|
};
|
2017-11-24 19:28:43 +01:00
|
|
|
match version_check::is_nightly() {
|
2018-05-10 01:27:31 +02:00
|
|
|
Some(true) => {
|
|
|
|
println!("cargo:rustc-cfg=actix_nightly");
|
|
|
|
println!("cargo:rustc-cfg=actix_impl_trait");
|
|
|
|
}
|
2017-11-24 19:28:43 +01:00
|
|
|
Some(false) => (),
|
|
|
|
None => (),
|
|
|
|
};
|
2017-10-26 15:12:23 +02:00
|
|
|
}
|