From 52af8293a8e31d27ae0cb712505cf6daf2f36549 Mon Sep 17 00:00:00 2001 From: Tomas Krnak Date: Thu, 13 Oct 2022 10:54:30 +0200 Subject: [PATCH] fixup! Add `uninline-portable` feature --- src/fields/fp.rs | 10 +++++----- src/fields/fq.rs | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/fields/fp.rs b/src/fields/fp.rs index ee1fe39..332598b 100644 --- a/src/fields/fp.rs +++ b/src/fields/fp.rs @@ -293,7 +293,7 @@ impl Fp { } /// Squares this element. - #[cfg_attr(inline, not(feature = "uninline-portable"))] + #[cfg_attr(not(feature = "uninline-portable"), inline)] pub const fn square(&self) -> Fp { let (r1, carry) = mac(0, self.0[0], self.0[1], 0); let (r2, carry) = mac(0, self.0[0], self.0[2], carry); @@ -373,7 +373,7 @@ impl Fp { } /// Multiplies `rhs` by `self`, returning the result. - #[cfg_attr(inline, not(feature = "uninline-portable"))] + #[cfg_attr(not(feature = "uninline-portable"), inline)] pub const fn mul(&self, rhs: &Self) -> Self { // Schoolbook multiplication @@ -401,7 +401,7 @@ impl Fp { } /// Subtracts `rhs` from `self`, returning the result. - #[cfg_attr(inline, not(feature = "uninline-portable"))] + #[cfg_attr(not(feature = "uninline-portable"), inline)] pub const fn sub(&self, rhs: &Self) -> Self { let (d0, borrow) = sbb(self.0[0], rhs.0[0], 0); let (d1, borrow) = sbb(self.0[1], rhs.0[1], borrow); @@ -419,7 +419,7 @@ impl Fp { } /// Adds `rhs` to `self`, returning the result. - #[cfg_attr(inline, not(feature = "uninline-portable"))] + #[cfg_attr(not(feature = "uninline-portable"), inline)] pub const fn add(&self, rhs: &Self) -> Self { let (d0, carry) = adc(self.0[0], rhs.0[0], 0); let (d1, carry) = adc(self.0[1], rhs.0[1], carry); @@ -432,7 +432,7 @@ impl Fp { } /// Negates `self`. - #[cfg_attr(inline, not(feature = "uninline-portable"))] + #[cfg_attr(not(feature = "uninline-portable"), inline)] pub const fn neg(&self) -> Self { // Subtract `self` from `MODULUS` to negate. Ignore the final // borrow because it cannot underflow; self is guaranteed to diff --git a/src/fields/fq.rs b/src/fields/fq.rs index 85227dd..c0296c4 100644 --- a/src/fields/fq.rs +++ b/src/fields/fq.rs @@ -293,7 +293,7 @@ impl Fq { } /// Squares this element. - #[cfg_attr(inline, not(feature = "uninline-portable"))] + #[cfg_attr(not(feature = "uninline-portable"), inline)] pub const fn square(&self) -> Fq { let (r1, carry) = mac(0, self.0[0], self.0[1], 0); let (r2, carry) = mac(0, self.0[0], self.0[2], carry); @@ -373,7 +373,7 @@ impl Fq { } /// Multiplies `rhs` by `self`, returning the result. - #[cfg_attr(inline, not(feature = "uninline-portable"))] + #[cfg_attr(not(feature = "uninline-portable"), inline)] pub const fn mul(&self, rhs: &Self) -> Self { // Schoolbook multiplication @@ -401,7 +401,7 @@ impl Fq { } /// Subtracts `rhs` from `self`, returning the result. - #[cfg_attr(inline, not(feature = "uninline-portable"))] + #[cfg_attr(not(feature = "uninline-portable"), inline)] pub const fn sub(&self, rhs: &Self) -> Self { let (d0, borrow) = sbb(self.0[0], rhs.0[0], 0); let (d1, borrow) = sbb(self.0[1], rhs.0[1], borrow); @@ -419,7 +419,7 @@ impl Fq { } /// Adds `rhs` to `self`, returning the result. - #[cfg_attr(inline, not(feature = "uninline-portable"))] + #[cfg_attr(not(feature = "uninline-portable"), inline)] pub const fn add(&self, rhs: &Self) -> Self { let (d0, carry) = adc(self.0[0], rhs.0[0], 0); let (d1, carry) = adc(self.0[1], rhs.0[1], carry); @@ -432,7 +432,7 @@ impl Fq { } /// Negates `self`. - #[cfg_attr(inline, not(feature = "uninline-portable"))] + #[cfg_attr(not(feature = "uninline-portable"), inline)] pub const fn neg(&self) -> Self { // Subtract `self` from `MODULUS` to negate. Ignore the final // borrow because it cannot underflow; self is guaranteed to