Skip to content

Commit 15ddc86

Browse files
committed
Merge #685: Allow unexpected_cfgs
ed869d7 Allow unexpected_cfgs (Tobin C. Harding) bea260d Use rustfmt::skip instead of cfg_attr (Tobin C. Harding) Pull request description: Rust `nightly` just introduced a new lint that breaks us, disable it. Same as rust-bitcoin/rust-bitcoin#2748 Please see 2748 for full description of the issue this resolves. Note, the first patch uses `rustfmt::skip` instead of `cfg_attr` to save triggering the lint in example code. ACKs for top commit: apoelstra: ACK ed869d7 Tree-SHA512: 9c158fa90eca8973ec8afec4b1bc334bce78bc6735ed945d40c36efb21f2728ea2b3c9179a5ee3e5638340be80a8ae49ae460ad1b13915d6cebcc2f9fcd1a538
2 parents 4590488 + ed869d7 commit 15ddc86

11 files changed

+19
-2
lines changed

examples/sign_multisig.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,8 @@ fn spending_transaction() -> bitcoin::Transaction {
9393
}
9494
}
9595

96+
#[rustfmt::skip]
9697
fn list_of_three_arbitrary_public_keys() -> Vec<bitcoin::PublicKey> {
97-
#[cfg_attr(feature="cargo-fmt", rustfmt_skip)]
9898
vec![
9999
bitcoin::PublicKey::from_slice(&[2; 33]).expect("key 1"),
100100
bitcoin::PublicKey::from_slice(&[

examples/verify_tx.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,9 @@ fn main() {
102102
}
103103

104104
/// Returns an arbitrary transaction.
105+
#[rustfmt::skip]
105106
fn hard_coded_transaction() -> bitcoin::Transaction {
106107
// tx `f27eba163c38ad3f34971198687a3f1882b7ec818599ffe469a8440d82261c98`
107-
#[cfg_attr(feature="cargo-fmt", rustfmt_skip)]
108108
let tx_bytes = vec![
109109
0x01, 0x00, 0x00, 0x00, 0x02, 0xc5, 0x11, 0x1d, 0xb7, 0x93, 0x50, 0xc1,
110110
0x70, 0x28, 0x41, 0x39, 0xe8, 0xe3, 0x4e, 0xb0, 0xed, 0xba, 0x64, 0x7b,

fuzz/fuzz_targets/compile_descriptor.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![allow(unexpected_cfgs)]
2+
13
use std::str::FromStr;
24

35
use honggfuzz::fuzz;

fuzz/fuzz_targets/parse_descriptor.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![allow(unexpected_cfgs)]
2+
13
use std::str::FromStr;
24

35
use honggfuzz::fuzz;

fuzz/fuzz_targets/parse_descriptor_secret.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![allow(unexpected_cfgs)]
2+
13
use std::str::FromStr;
24

35
use honggfuzz::fuzz;

fuzz/fuzz_targets/roundtrip_concrete.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![allow(unexpected_cfgs)]
2+
13
use std::str::FromStr;
24

35
use honggfuzz::fuzz;

fuzz/fuzz_targets/roundtrip_descriptor.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![allow(unexpected_cfgs)]
2+
13
use std::str::FromStr;
24

35
use honggfuzz::fuzz;

fuzz/fuzz_targets/roundtrip_miniscript_script.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![allow(unexpected_cfgs)]
2+
13
use honggfuzz::fuzz;
24
use miniscript::bitcoin::blockdata::script;
35
use miniscript::{Miniscript, Segwitv0};

fuzz/fuzz_targets/roundtrip_miniscript_str.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![allow(unexpected_cfgs)]
2+
13
use std::str::FromStr;
24

35
use honggfuzz::fuzz;

fuzz/fuzz_targets/roundtrip_semantic.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![allow(unexpected_cfgs)]
2+
13
use std::str::FromStr;
24

35
use honggfuzz::fuzz;

src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@
8888
// Clippy lints that we have disabled
8989
#![allow(clippy::iter_kv_map)] // https://github.com/rust-lang/rust-clippy/issues/11752
9090
#![allow(clippy::manual_range_contains)] // I hate this lint -asp
91+
#![allow(unexpected_cfgs)] // This one is just batshit.
9192

9293
#[cfg(target_pointer_width = "16")]
9394
compile_error!(

0 commit comments

Comments
 (0)