Mitigate check-cfg until MSRV 1.77 (#652)

This commit is contained in:
pinkforest(she/her) 2024-05-09 23:24:16 +10:00 committed by GitHub
parent 1efe6a93b1
commit 9252fa5c0d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 5 additions and 9 deletions

View File

@ -23,10 +23,6 @@ where
a - b
}
#[unsafe_target_feature("sse2")]
#[cfg(feature = "dummy")]
fn function_with_cfg() {}
#[unsafe_target_feature("sse2")]
#[rustfmt::skip]
fn function_with_rustfmt_skip() {}
@ -45,9 +41,6 @@ impl Struct {
fn member_function_with_const_arg<const N: u32>(self) -> u32 {
self.a - N
}
#[cfg(feature = "dummy")]
fn member_function_with_cfg() {}
}
struct StructWithGenerics<T>
@ -93,7 +86,7 @@ mod inner {
}
}
#[unsafe_target_feature_specialize("sse2", "avx2", conditional("avx512ifma", disabled))]
#[unsafe_target_feature_specialize("sse2", "avx2")]
mod inner_spec {
#[for_target_feature("sse2")]
const CONST: u32 = 1;

View File

@ -42,6 +42,8 @@
unused_lifetimes,
unused_qualifications
)]
// Requires MSRV 1.77 as it does not allow build.rs gating
#![allow(unexpected_cfgs)]
//------------------------------------------------------------------------
// External dependencies:

View File

@ -1233,10 +1233,12 @@ impl Field for Scalar {
}
fn sqrt_ratio(num: &Self, div: &Self) -> (Choice, Self) {
#[allow(unused_qualifications)]
group::ff::helpers::sqrt_ratio_generic(num, div)
}
fn sqrt(&self) -> CtOption<Self> {
#[allow(unused_qualifications)]
group::ff::helpers::sqrt_tonelli_shanks(
self,
[

View File

@ -15,7 +15,6 @@
// README.md as the crate documentation.
#![no_std]
#![cfg_attr(feature = "bench", feature(test))]
#![cfg_attr(docsrs, feature(doc_auto_cfg, doc_cfg, doc_cfg_hide))]
#![cfg_attr(docsrs, doc(cfg_hide(docsrs)))]
#![deny(missing_docs)]