Merge rust-bitcoin/rust-bitcoin#2785: Whitelist cfg attrs and bump nightly version
30a482504b
bump nightly-version (Andrew Poelstra)5ad7c245e3
cargo: whitelist all cfgs used in this repo (Andrew Poelstra)814786b0a6
crypto: enable and fix accidentally disabled unit test (Andrew Poelstra) Pull request description: https://github.com/rust-lang/rust/issues/124800 has been fixed and we can update our nightly version by whitelisting all cfgs that are used. There was one place where we had an old `cfg(feature = "no-std")` despite having removed the feature. By removing that cfg check we re-enabled a previously disabled test. ACKs for top commit: tcharding: ACK30a482504b
Tree-SHA512: d25bed819091db74b9d47cb2c23caa3ceb0d7be323b37831326e2ec1608cb1577d41aad2e1cdf59d66df69397537bc3e17a3c2872935d5a4f46f4dc55b5e613c
This commit is contained in:
commit
1142d16192
|
@ -26,3 +26,6 @@ internals = { package = "bitcoin-internals", version = "0.3.0", features = ["all
|
|||
|
||||
[dev-dependencies]
|
||||
hex = { package = "hex-conservative", version = "0.2.0", default-features = false, features = ["alloc"] }
|
||||
|
||||
[lints.rust]
|
||||
unexpected_cfgs = { level = "deny", check-cfg = ['cfg(bench)', 'cfg(fuzzing)', 'cfg(kani)' ] }
|
||||
|
|
|
@ -79,3 +79,6 @@ required-features = ["std", "rand-std", "bitcoinconsensus"]
|
|||
|
||||
[[example]]
|
||||
name = "sighash"
|
||||
|
||||
[lints.rust]
|
||||
unexpected_cfgs = { level = "deny", check-cfg = ['cfg(bench)', 'cfg(fuzzing)', 'cfg(kani)', 'cfg(mutate)', 'cfg(rust_v_1_60)'] }
|
||||
|
|
|
@ -1521,12 +1521,12 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(all(not(feature = "std"), feature = "no-std"))]
|
||||
#[cfg(not(feature = "std"))]
|
||||
fn private_key_debug_is_obfuscated() {
|
||||
let sk =
|
||||
PrivateKey::from_str("cVt4o7BGAig1UXywgGSmARhxMdzP5qvQsxKkSsc1XEkw3tDTQFpy").unwrap();
|
||||
// Why is this not shortened? In rust-secp256k1/src/secret it is printed with "#{:016x}"?
|
||||
let want = "PrivateKey { compressed: true, network: Testnet, inner: SecretKey(#7217ac58fbad8880a91032107b82cb6c5422544b426c350ee005cf509f3dbf7b) }";
|
||||
let want = "PrivateKey { compressed: true, network: Test, inner: SecretKey(#7217ac58fbad8880a91032107b82cb6c5422544b426c350ee005cf509f3dbf7b) }";
|
||||
let got = format!("{:?}", sk);
|
||||
assert_eq!(got, want)
|
||||
}
|
||||
|
|
|
@ -88,3 +88,6 @@ path = "fuzz_targets/hashes/sha512.rs"
|
|||
[[bin]]
|
||||
name = "units_deserialize_amount"
|
||||
path = "fuzz_targets/units/deserialize_amount.rs"
|
||||
|
||||
[lints.rust]
|
||||
unexpected_cfgs = { level = "deny", check-cfg = ['cfg(fuzzing)'] }
|
||||
|
|
|
@ -36,3 +36,6 @@ serde = { version = "1.0", default-features = false, optional = true }
|
|||
[dev-dependencies]
|
||||
serde_test = "1.0"
|
||||
serde_json = "1.0"
|
||||
|
||||
[lints.rust]
|
||||
unexpected_cfgs = { level = "deny", check-cfg = ['cfg(bench)', 'cfg(hashes_fuzz)', 'cfg(rust_v_1_64)' ] }
|
||||
|
|
|
@ -26,3 +26,6 @@ rustdoc-args = ["--cfg", "docsrs"]
|
|||
serde = { version = "1.0.103", default-features = false, optional = true }
|
||||
|
||||
[dev-dependencies]
|
||||
|
||||
[lints.rust]
|
||||
unexpected_cfgs = { level = "deny", check-cfg = ['cfg(rust_v_1_64)', 'cfg(rust_v_1_61)'] }
|
||||
|
|
|
@ -21,3 +21,6 @@ alloc = []
|
|||
[package.metadata.docs.rs]
|
||||
all-features = true
|
||||
rustdoc-args = ["--cfg", "docsrs"]
|
||||
|
||||
[lints.rust]
|
||||
unexpected_cfgs = { level = "deny" }
|
||||
|
|
|
@ -1 +1 @@
|
|||
nightly-2024-05-04
|
||||
nightly-2024-05-21
|
||||
|
|
|
@ -29,3 +29,6 @@ serde = { version = "1.0.103", default-features = false, features = ["derive"],
|
|||
[dev-dependencies]
|
||||
serde_test = "1.0"
|
||||
serde_json = "1.0"
|
||||
|
||||
[lints.rust]
|
||||
unexpected_cfgs = { level = "deny", check-cfg = ['cfg(kani)'] }
|
||||
|
|
Loading…
Reference in New Issue