diff --git a/build.rs b/build.rs index 103280ae..463d1669 100644 --- a/build.rs +++ b/build.rs @@ -1,14 +1,10 @@ extern crate rustc_version; -use rustc_version::{version, version_meta, Version, Channel}; +use rustc_version::{version, version_meta, Channel}; fn main() { let mut current = version().unwrap(); current.pre = Vec::new(); - if current >= Version::parse( "1.30.0" ).unwrap() { - println!( "cargo:rustc-cfg=rust_1_30_or_newer" ); - } - if version_meta().unwrap().channel == Channel::Nightly { println!( "cargo:rustc-cfg=rust_nightly" ); } diff --git a/src/lib.rs b/src/lib.rs index 12b03cfb..c28abf58 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -111,7 +111,7 @@ unused_qualifications )] #![cfg_attr( - all(test, rust_1_30_or_newer, rust_nightly), + all(test, rust_nightly), feature(linkage) // Needed for async tests. )] #![cfg_attr(rust_nightly, feature(core_intrinsics))] @@ -130,17 +130,14 @@ extern crate serde_json; #[macro_use] extern crate serde_derive; -#[cfg(rust_1_30_or_newer)] extern crate stdweb_internal_macros; #[cfg(all( - rust_1_30_or_newer, target_arch = "wasm32", target_os = "unknown" ))] pub use stdweb_internal_macros::js_export; -#[cfg(rust_1_30_or_newer)] pub use stdweb_internal_macros::async_test; #[cfg(feature = "futures-support")] diff --git a/stdweb-internal-macros/Cargo.toml b/stdweb-internal-macros/Cargo.toml index 2b2f5b24..25f695ed 100644 --- a/stdweb-internal-macros/Cargo.toml +++ b/stdweb-internal-macros/Cargo.toml @@ -11,8 +11,6 @@ keywords = ["web", "asmjs", "webasm", "javascript"] categories = ["api-bindings", "gui", "web-programming"] description = "Internal procedural macros for the `stdweb` crate" -build = "build.rs" - [lib] proc-macro = true @@ -29,5 +27,3 @@ version = "0.15" default-features = false features = ["full", "parsing", "printing", "clone-impls"] -[build-dependencies] -rustc_version = "0.2" diff --git a/stdweb-internal-macros/build.rs b/stdweb-internal-macros/build.rs deleted file mode 100644 index a9edc85d..00000000 --- a/stdweb-internal-macros/build.rs +++ /dev/null @@ -1,11 +0,0 @@ -extern crate rustc_version; -use rustc_version::{version, Version}; - -fn main() { - let mut current = version().unwrap(); - current.pre = Vec::new(); - - if current >= Version::parse( "1.30.0" ).unwrap() { - println!( "cargo:rustc-cfg=rust_1_30_or_newer" ); - } -} diff --git a/stdweb-internal-macros/src/lib.rs b/stdweb-internal-macros/src/lib.rs index 861caafa..83f43fba 100644 --- a/stdweb-internal-macros/src/lib.rs +++ b/stdweb-internal-macros/src/lib.rs @@ -11,18 +11,14 @@ extern crate serde; extern crate serde_derive; extern crate serde_json; -#[cfg(rust_1_30_or_newer)] mod macro_js_export; -#[cfg(rust_1_30_or_newer)] mod macro_async_test; -#[cfg(rust_1_30_or_newer)] #[proc_macro_attribute] pub fn js_export( attrs: proc_macro::TokenStream, input: proc_macro::TokenStream ) -> proc_macro::TokenStream { macro_js_export::js_export( attrs, input ) } -#[cfg(rust_1_30_or_newer)] #[proc_macro_attribute] pub fn async_test( attrs: proc_macro::TokenStream, input: proc_macro::TokenStream ) -> proc_macro::TokenStream { macro_async_test::async_test( attrs, input )