diff --git a/strum_tests/Cargo.toml b/strum_tests/Cargo.toml index 28664a2..9105172 100644 --- a/strum_tests/Cargo.toml +++ b/strum_tests/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "strum_tests" -version = "0.22.0" +version = "0.23.0" edition = "2018" authors = ["Peter Glotfelty "] @@ -12,8 +12,5 @@ enum_variant_type = "=0.2.0" structopt = "0.2.18" bitflags = "=1.2" -[build-dependencies] -version_check = "0.9.2" - [dev-dependencies] rustversion = "1.0" diff --git a/strum_tests/build.rs b/strum_tests/build.rs deleted file mode 100644 index 2f7ff23..0000000 --- a/strum_tests/build.rs +++ /dev/null @@ -1,7 +0,0 @@ -fn main() { - // Check if version of rustc is >= 1.34 - if let Some(true) = version_check::is_min_version("1.34.0") { - println!("cargo:rustc-cfg=try_from"); - println!("cargo:rustc-cfg=bare_pub"); - } -} diff --git a/strum_tests/tests/enum_discriminants.rs b/strum_tests/tests/enum_discriminants.rs index a9233db..c8fed87 100644 --- a/strum_tests/tests/enum_discriminants.rs +++ b/strum_tests/tests/enum_discriminants.rs @@ -204,8 +204,8 @@ fn from_ref_test_complex() { assert_eq!(EnumIntoComplexVars::A, (&EnumIntoComplex::A(&rara)).into()); } -#[cfg(try_from)] #[allow(dead_code)] +#[rustversion::since(1.34)] #[derive(Debug, Eq, PartialEq, EnumDiscriminants, EnumVariantType)] #[strum_discriminants( name(VariantFilterAttrDiscs), @@ -219,8 +219,8 @@ enum VariantFilterAttr { BrightWhite(i32), } -#[cfg(try_from)] -#[test] +#[rustversion::attr(since(1.34), test)] +#[rustversion::since(1.34)] fn filter_variant_attributes_pass_through() { use std::str::FromStr; @@ -238,8 +238,8 @@ fn filter_variant_attributes_pass_through() { ); } -#[cfg(bare_pub)] #[test] +#[rustversion::since(1.34)] fn override_visibility() { mod private { use super::*; @@ -259,8 +259,8 @@ fn override_visibility() { ); } -#[cfg(not(bare_pub))] #[test] +#[rustversion::before(1.34)] fn override_visibility() { mod private { use super::*;