Skip to content

Commit 9252fa5

Browse files
authored
Mitigate check-cfg until MSRV 1.77 (#652)
1 parent 1efe6a9 commit 9252fa5

File tree

4 files changed

+5
-9
lines changed

4 files changed

+5
-9
lines changed

curve25519-dalek-derive/tests/tests.rs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,6 @@ where
2323
a - b
2424
}
2525

26-
#[unsafe_target_feature("sse2")]
27-
#[cfg(feature = "dummy")]
28-
fn function_with_cfg() {}
29-
3026
#[unsafe_target_feature("sse2")]
3127
#[rustfmt::skip]
3228
fn function_with_rustfmt_skip() {}
@@ -45,9 +41,6 @@ impl Struct {
4541
fn member_function_with_const_arg<const N: u32>(self) -> u32 {
4642
self.a - N
4743
}
48-
49-
#[cfg(feature = "dummy")]
50-
fn member_function_with_cfg() {}
5144
}
5245

5346
struct StructWithGenerics<T>
@@ -93,7 +86,7 @@ mod inner {
9386
}
9487
}
9588

96-
#[unsafe_target_feature_specialize("sse2", "avx2", conditional("avx512ifma", disabled))]
89+
#[unsafe_target_feature_specialize("sse2", "avx2")]
9790
mod inner_spec {
9891
#[for_target_feature("sse2")]
9992
const CONST: u32 = 1;

curve25519-dalek/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@
4242
unused_lifetimes,
4343
unused_qualifications
4444
)]
45+
// Requires MSRV 1.77 as it does not allow build.rs gating
46+
#![allow(unexpected_cfgs)]
4547

4648
//------------------------------------------------------------------------
4749
// External dependencies:

curve25519-dalek/src/scalar.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1233,10 +1233,12 @@ impl Field for Scalar {
12331233
}
12341234

12351235
fn sqrt_ratio(num: &Self, div: &Self) -> (Choice, Self) {
1236+
#[allow(unused_qualifications)]
12361237
group::ff::helpers::sqrt_ratio_generic(num, div)
12371238
}
12381239

12391240
fn sqrt(&self) -> CtOption<Self> {
1241+
#[allow(unused_qualifications)]
12401242
group::ff::helpers::sqrt_tonelli_shanks(
12411243
self,
12421244
[

x25519-dalek/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
// README.md as the crate documentation.
1616

1717
#![no_std]
18-
#![cfg_attr(feature = "bench", feature(test))]
1918
#![cfg_attr(docsrs, feature(doc_auto_cfg, doc_cfg, doc_cfg_hide))]
2019
#![cfg_attr(docsrs, doc(cfg_hide(docsrs)))]
2120
#![deny(missing_docs)]

0 commit comments

Comments
 (0)