Merge rust-bitcoin/rust-bitcoin#1608: Set `rustv_1_53` in build script
bb612fdafa
Set rustv_1_53 in build script (Tobin C. Harding) Pull request description: The rust version is supposed to be set by the build script so that users automagically get features matching the toolchain in use. Currently we have a feature in the manifest for `rustv_1_53` instead setting a compiler conditional configuration option in the build script. This causes `cargo +1.41.1 --all-features check` to fail. ## Note I don't see `rustv_1_46` used anywhere, do we need that still? ACKs for top commit: apoelstra: ACKbb612fdafa
Kixunil: ACKbb612fdafa
Tree-SHA512: f74195d4ee5a5bc5f209e99d30789df3552cef10aee5ea8b61a5a701b753999c34d04be9fe0321ccee7a8ec14fa5a05e0b454b9dc5f8deddd7b5b8d4f3d7e744
This commit is contained in:
commit
12298ddc14
|
@ -21,7 +21,6 @@ serde = ["actual-serde", "bitcoin_hashes/serde", "secp256k1/serde"]
|
||||||
secp-lowmemory = ["secp256k1/lowmemory"]
|
secp-lowmemory = ["secp256k1/lowmemory"]
|
||||||
secp-recovery = ["secp256k1/recovery"]
|
secp-recovery = ["secp256k1/recovery"]
|
||||||
bitcoinconsensus-std = ["bitcoinconsensus/std", "std"]
|
bitcoinconsensus-std = ["bitcoinconsensus/std", "std"]
|
||||||
rust_v_1_53 = []
|
|
||||||
|
|
||||||
# At least one of std, no-std must be enabled.
|
# At least one of std, no-std must be enabled.
|
||||||
#
|
#
|
||||||
|
|
|
@ -23,7 +23,7 @@ fn main() {
|
||||||
.parse::<u64>()
|
.parse::<u64>()
|
||||||
.expect("invalid Rust minor version");
|
.expect("invalid Rust minor version");
|
||||||
|
|
||||||
for activate_version in &[46] {
|
for activate_version in &[46, 53] {
|
||||||
if minor >= *activate_version {
|
if minor >= *activate_version {
|
||||||
println!("cargo:rustc-cfg=rust_v_1_{}", activate_version);
|
println!("cargo:rustc-cfg=rust_v_1_{}", activate_version);
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,7 +59,7 @@ use core::convert::TryFrom;
|
||||||
use core::borrow::{Borrow, BorrowMut};
|
use core::borrow::{Borrow, BorrowMut};
|
||||||
use core::{fmt, default::Default};
|
use core::{fmt, default::Default};
|
||||||
use core::ops::{Deref, DerefMut, Index, Range, RangeFull, RangeFrom, RangeTo, RangeInclusive, RangeToInclusive};
|
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;
|
use core::ops::Bound;
|
||||||
|
|
||||||
#[cfg(feature = "serde")] use serde;
|
#[cfg(feature = "serde")] use serde;
|
||||||
|
@ -615,8 +615,8 @@ macro_rules! delegate_index {
|
||||||
}
|
}
|
||||||
|
|
||||||
delegate_index!(Range<usize>, RangeFrom<usize>, RangeTo<usize>, RangeFull, RangeInclusive<usize>, RangeToInclusive<usize>);
|
delegate_index!(Range<usize>, RangeFrom<usize>, RangeTo<usize>, RangeFull, RangeInclusive<usize>, RangeToInclusive<usize>);
|
||||||
#[cfg(feature = "rust_v_1_53")]
|
#[cfg(rust_v_1_53)]
|
||||||
#[cfg_attr(docsrs, doc(cfg(feature = "rust_v_1_53")))]
|
#[cfg_attr(docsrs, doc(cfg(rust_v_1_53)))]
|
||||||
delegate_index!((Bound<usize>, Bound<usize>));
|
delegate_index!((Bound<usize>, Bound<usize>));
|
||||||
|
|
||||||
impl AsRef<Script> for Script {
|
impl AsRef<Script> for Script {
|
||||||
|
|
Loading…
Reference in New Issue