diff --git a/bitcoin/Cargo.toml b/bitcoin/Cargo.toml index 51bd0f36..9b671e0a 100644 --- a/bitcoin/Cargo.toml +++ b/bitcoin/Cargo.toml @@ -21,7 +21,6 @@ serde = ["actual-serde", "bitcoin_hashes/serde", "secp256k1/serde"] secp-lowmemory = ["secp256k1/lowmemory"] secp-recovery = ["secp256k1/recovery"] bitcoinconsensus-std = ["bitcoinconsensus/std", "std"] -rust_v_1_53 = [] # At least one of std, no-std must be enabled. # diff --git a/bitcoin/build.rs b/bitcoin/build.rs index 0879f651..d4785580 100644 --- a/bitcoin/build.rs +++ b/bitcoin/build.rs @@ -23,7 +23,7 @@ fn main() { .parse::() .expect("invalid Rust minor version"); - for activate_version in &[46] { + for activate_version in &[46, 53] { if minor >= *activate_version { println!("cargo:rustc-cfg=rust_v_1_{}", activate_version); } diff --git a/bitcoin/src/blockdata/script.rs b/bitcoin/src/blockdata/script.rs index ee496c0f..cef569bb 100644 --- a/bitcoin/src/blockdata/script.rs +++ b/bitcoin/src/blockdata/script.rs @@ -59,7 +59,7 @@ use core::convert::TryFrom; use core::borrow::{Borrow, BorrowMut}; use core::{fmt, default::Default}; use core::ops::{Deref, DerefMut, Index, Range, RangeFull, RangeFrom, RangeTo, RangeInclusive, RangeToInclusive}; -#[cfg(feature = "rust_v_1_53")] +#[cfg(rust_v_1_53)] use core::ops::Bound; #[cfg(feature = "serde")] use serde; @@ -615,8 +615,8 @@ macro_rules! delegate_index { } delegate_index!(Range, RangeFrom, RangeTo, RangeFull, RangeInclusive, RangeToInclusive); -#[cfg(feature = "rust_v_1_53")] -#[cfg_attr(docsrs, doc(cfg(feature = "rust_v_1_53")))] +#[cfg(rust_v_1_53)] +#[cfg_attr(docsrs, doc(cfg(rust_v_1_53)))] delegate_index!((Bound, Bound)); impl AsRef