diff --git a/impl/Cargo.toml b/impl/Cargo.toml index d84d8c48..3bd34f72 100644 --- a/impl/Cargo.toml +++ b/impl/Cargo.toml @@ -44,7 +44,7 @@ features = ["full"] rustdoc-args = ["--cfg", "docsrs"] [lints.rust] -unexpected_cfgs = { level = "warn", check-cfg = ["cfg(ci)", "cfg(nightly)"] } +unexpected_cfgs = { level = "warn", check-cfg = ["cfg(ci)"] } [features] default = [] diff --git a/impl/build.rs b/impl/build.rs deleted file mode 100644 index dbd20bb6..00000000 --- a/impl/build.rs +++ /dev/null @@ -1,15 +0,0 @@ -#[cfg(not(feature = "testing-helpers"))] -fn detect_nightly() {} - -#[cfg(feature = "testing-helpers")] -fn detect_nightly() { - use rustc_version::{version_meta, Channel}; - - if version_meta().unwrap().channel == Channel::Nightly { - println!("cargo:rustc-cfg=nightly"); - } -} - -fn main() { - detect_nightly(); -} diff --git a/impl/doc/error.md b/impl/doc/error.md index 2aace519..132287d6 100644 --- a/impl/doc/error.md +++ b/impl/doc/error.md @@ -57,11 +57,11 @@ Backtraces don't work though, because the `Backtrace` type is only available in ## Example usage ```rust -# #![cfg_attr(nightly, feature(error_generic_member_access))] +# #![rustversion::attr(nightly, feature(error_generic_member_access))] // Nightly requires enabling this feature: // #![feature(error_generic_member_access)] -# #[cfg(not(nightly))] fn main() {} -# #[cfg(nightly)] fn main() { +# #[rustversion::not(nightly)] fn main() {} +# #[rustversion::nightly] fn main() { # use core::error::{request_ref, request_value, Error as __}; # use std::backtrace::Backtrace; # diff --git a/tests/generics.rs b/tests/generics.rs index 42c568a4..6f887188 100644 --- a/tests/generics.rs +++ b/tests/generics.rs @@ -38,7 +38,6 @@ struct WrappedDouble(T, U); #[from(forward)] struct WrappedDouble2(T, U); -#[cfg(nightly)] #[derive( From, FromStr,