diff --git a/ector/build.rs b/ector/build.rs new file mode 100644 index 0000000..dc2fee5 --- /dev/null +++ b/ector/build.rs @@ -0,0 +1,5 @@ +fn main() { + if std::env::var_os("CARGO_FEATURE_NIGHTLY").is_some() { + println!("cargo:rustc-cfg=nightly"); + } +} diff --git a/macros/Cargo.toml b/macros/Cargo.toml index 0b76ed8..b954d11 100644 --- a/macros/Cargo.toml +++ b/macros/Cargo.toml @@ -22,3 +22,4 @@ proc-macro2 = "1.0" [features] std = [] +nightly = [] diff --git a/macros/src/lib.rs b/macros/src/lib.rs index fb4c74c..45aaceb 100644 --- a/macros/src/lib.rs +++ b/macros/src/lib.rs @@ -1,4 +1,6 @@ #![allow(incomplete_features)] +#![cfg(feature = "nightly")] +#![feature(proc_macro_diagnostic)] extern crate proc_macro; mod actor;