Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[draft] Multi Thread PK Read/Write #21

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Add multi-thread pk read/write

4beeb03
Select commit
Loading
Failed to load commit list.
Sign in for the full log view
Open

[draft] Multi Thread PK Read/Write #21

Add multi-thread pk read/write
4beeb03
Select commit
Loading
Failed to load commit list.
GitHub Actions / Clippy (beta) failed Oct 30, 2023 in 0s

Clippy (beta)

22 errors, 4 warnings

Details

Results

Message level Amount
Internal compiler error 0
Error 22
Warning 4
Note 0
Help 0

Versions

  • rustc 1.66.0-nightly (0da281b60 2022-10-27)
  • cargo 1.66.0-nightly (9210810d1 2022-10-25)
  • clippy 0.1.66 (0da281b 2022-10-27)

Annotations

Check failure on line 216 in arithmetic/curves/src/derive/field.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (beta)

this function takes 8 arguments but 1 argument was supplied

error[E0061]: this function takes 8 arguments but 1 argument was supplied
   --> arithmetic/curves/src/derive/field.rs:216:27
    |
216 |                   let tmp = $field::montgomery_reduce(&[
    |  ___________________________^^^^^^^^^^^^^^^^^^^^^^^^^--
    | |____________________________________________________|
    | |
217 | |                     elt.0[0], elt.0[1], elt.0[2], elt.0[3], 0, 0, 0, 0,
218 | |                 ]);
    | |_________________-- multiple arguments are missing
    | |_________________|
    |                   expected `u64`, found `&[u64; 8]`
    |
   ::: arithmetic/curves/src/secp256k1/fq.rs:116:1
    |
116 | / field_common!(
117 | |     Fq,
118 | |     MODULUS,
119 | |     INV,
...   |
127 | |     R3
128 | | );
    | |_- in this macro invocation
    |
note: associated function defined here
   --> arithmetic/curves/src/derive/field.rs:675:33
    |
675 |             pub(crate) const fn montgomery_reduce(
    |                                 ^^^^^^^^^^^^^^^^^
676 |                 r0: u64,
    |                 -------
677 |                 mut r1: u64,
    |                 -----------
678 |                 mut r2: u64,
    |                 -----------
679 |                 mut r3: u64,
    |                 -----------
680 |                 mut r4: u64,
    |                 -----------
681 |                 mut r5: u64,
    |                 -----------
682 |                 mut r6: u64,
    |                 -----------
683 |                 mut r7: u64,
    |                 -----------
    |
   ::: arithmetic/curves/src/secp256k1/fq.rs:129:1
    |
129 | field_arithmetic!(Fq, MODULUS, INV, dense);
    | ------------------------------------------ in this macro invocation
    = note: this error originates in the macro `field_common` which comes from the expansion of the macro `field_arithmetic` (in Nightly builds, run with -Z macro-backtrace for more info)
help: provide the arguments
    |
216 |                 let tmp = $field::montgomery_reduce(/* u64 */, /* u64 */, /* u64 */, /* u64 */, /* u64 */, /* u64 */, /* u64 */, /* u64 */);
    |                                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Check failure on line 216 in arithmetic/curves/src/derive/field.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (beta)

this function takes 8 arguments but 1 argument was supplied

error[E0061]: this function takes 8 arguments but 1 argument was supplied
   --> arithmetic/curves/src/derive/field.rs:216:27
    |
216 |                   let tmp = $field::montgomery_reduce(&[
    |  ___________________________^^^^^^^^^^^^^^^^^^^^^^^^^--
    | |____________________________________________________|
    | |
217 | |                     elt.0[0], elt.0[1], elt.0[2], elt.0[3], 0, 0, 0, 0,
218 | |                 ]);
    | |_________________-- multiple arguments are missing
    | |_________________|
    |                   expected `u64`, found `&[u64; 8]`
    |
   ::: arithmetic/curves/src/secp256k1/fp.rs:84:1
    |
84  | / field_common!(
85  | |     Fp,
86  | |     MODULUS,
87  | |     INV,
...   |
95  | |     R3
96  | | );
    | |_- in this macro invocation
    |
note: associated function defined here
   --> arithmetic/curves/src/derive/field.rs:675:33
    |
675 |             pub(crate) const fn montgomery_reduce(
    |                                 ^^^^^^^^^^^^^^^^^
676 |                 r0: u64,
    |                 -------
677 |                 mut r1: u64,
    |                 -----------
678 |                 mut r2: u64,
    |                 -----------
679 |                 mut r3: u64,
    |                 -----------
680 |                 mut r4: u64,
    |                 -----------
681 |                 mut r5: u64,
    |                 -----------
682 |                 mut r6: u64,
    |                 -----------
683 |                 mut r7: u64,
    |                 -----------
    |
   ::: arithmetic/curves/src/secp256k1/fp.rs:97:1
    |
97  | field_arithmetic!(Fp, MODULUS, INV, dense);
    | ------------------------------------------ in this macro invocation
    = note: this error originates in the macro `field_common` which comes from the expansion of the macro `field_arithmetic` (in Nightly builds, run with -Z macro-backtrace for more info)
help: provide the arguments
    |
216 |                 let tmp = $field::montgomery_reduce(/* u64 */, /* u64 */, /* u64 */, /* u64 */, /* u64 */, /* u64 */, /* u64 */, /* u64 */);
    |                                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Check failure on line 112 in arithmetic/curves/src/bn256/assembly.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (beta)

the trait bound `u64: std::ops::BitAnd<bool>` is not satisfied

error[E0277]: the trait bound `u64: std::ops::BitAnd<bool>` is not satisfied
   --> arithmetic/curves/src/bn256/assembly.rs:112:53
    |
112 |                   let (d3, _) = adc(d3, $modulus.0[3] & borrow, carry);
    |                                                       ^ no implementation for `u64 & bool`
    |
   ::: arithmetic/curves/src/bn256/fr.rs:144:1
    |
144 | / assembly_field!(
145 | |     Fr,
146 | |     MODULUS,
147 | |     INV,
...   |
155 | |     R3
156 | | );
    | |_- in this macro invocation
    |
    = help: the trait `~const std::ops::BitAnd<bool>` is not implemented for `u64`
    = help: the following other types implement trait `std::ops::BitAnd<Rhs>`:
              <&'a i128 as std::ops::BitAnd<i128>>
              <&'a i16 as std::ops::BitAnd<i16>>
              <&'a i32 as std::ops::BitAnd<i32>>
              <&'a i64 as std::ops::BitAnd<i64>>
              <&'a i8 as std::ops::BitAnd<i8>>
              <&'a isize as std::ops::BitAnd<isize>>
              <&'a u128 as std::ops::BitAnd<u128>>
              <&'a u16 as std::ops::BitAnd<u16>>
            and 40 others
    = note: this error originates in the macro `assembly_field` (in Nightly builds, run with -Z macro-backtrace for more info)

Check failure on line 111 in arithmetic/curves/src/bn256/assembly.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (beta)

the trait bound `u64: std::ops::BitAnd<bool>` is not satisfied

error[E0277]: the trait bound `u64: std::ops::BitAnd<bool>` is not satisfied
   --> arithmetic/curves/src/bn256/assembly.rs:111:57
    |
111 |                   let (d2, carry) = adc(d2, $modulus.0[2] & borrow, carry);
    |                                                           ^ no implementation for `u64 & bool`
    |
   ::: arithmetic/curves/src/bn256/fr.rs:144:1
    |
144 | / assembly_field!(
145 | |     Fr,
146 | |     MODULUS,
147 | |     INV,
...   |
155 | |     R3
156 | | );
    | |_- in this macro invocation
    |
    = help: the trait `~const std::ops::BitAnd<bool>` is not implemented for `u64`
    = help: the following other types implement trait `std::ops::BitAnd<Rhs>`:
              <&'a i128 as std::ops::BitAnd<i128>>
              <&'a i16 as std::ops::BitAnd<i16>>
              <&'a i32 as std::ops::BitAnd<i32>>
              <&'a i64 as std::ops::BitAnd<i64>>
              <&'a i8 as std::ops::BitAnd<i8>>
              <&'a isize as std::ops::BitAnd<isize>>
              <&'a u128 as std::ops::BitAnd<u128>>
              <&'a u16 as std::ops::BitAnd<u16>>
            and 40 others
    = note: this error originates in the macro `assembly_field` (in Nightly builds, run with -Z macro-backtrace for more info)

Check failure on line 110 in arithmetic/curves/src/bn256/assembly.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (beta)

the trait bound `u64: std::ops::BitAnd<bool>` is not satisfied

error[E0277]: the trait bound `u64: std::ops::BitAnd<bool>` is not satisfied
   --> arithmetic/curves/src/bn256/assembly.rs:110:57
    |
110 |                   let (d1, carry) = adc(d1, $modulus.0[1] & borrow, carry);
    |                                                           ^ no implementation for `u64 & bool`
    |
   ::: arithmetic/curves/src/bn256/fr.rs:144:1
    |
144 | / assembly_field!(
145 | |     Fr,
146 | |     MODULUS,
147 | |     INV,
...   |
155 | |     R3
156 | | );
    | |_- in this macro invocation
    |
    = help: the trait `~const std::ops::BitAnd<bool>` is not implemented for `u64`
    = help: the following other types implement trait `std::ops::BitAnd<Rhs>`:
              <&'a i128 as std::ops::BitAnd<i128>>
              <&'a i16 as std::ops::BitAnd<i16>>
              <&'a i32 as std::ops::BitAnd<i32>>
              <&'a i64 as std::ops::BitAnd<i64>>
              <&'a i8 as std::ops::BitAnd<i8>>
              <&'a isize as std::ops::BitAnd<isize>>
              <&'a u128 as std::ops::BitAnd<u128>>
              <&'a u16 as std::ops::BitAnd<u16>>
            and 40 others
    = note: this error originates in the macro `assembly_field` (in Nightly builds, run with -Z macro-backtrace for more info)

Check failure on line 109 in arithmetic/curves/src/bn256/assembly.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (beta)

mismatched types

error[E0308]: mismatched types
   --> arithmetic/curves/src/bn256/assembly.rs:109:67
    |
109 |                   let (d0, carry) = adc(d0, $modulus.0[0] & borrow, 0);
    |                                     ---                             ^ expected `bool`, found integer
    |                                     |
    |                                     arguments to this function are incorrect
    |
   ::: arithmetic/curves/src/bn256/fr.rs:144:1
    |
144 | / assembly_field!(
145 | |     Fr,
146 | |     MODULUS,
147 | |     INV,
...   |
155 | |     R3
156 | | );
    | |_- in this macro invocation
    |
note: function defined here
   --> arithmetic/curves/src/arithmetic.rs:75:21
    |
75  | pub(crate) const fn adc(a: u64, b: u64, carry: bool) -> (u64, bool) {
    |                     ^^^                 -----------
    = note: this error originates in the macro `assembly_field` (in Nightly builds, run with -Z macro-backtrace for more info)

Check failure on line 109 in arithmetic/curves/src/bn256/assembly.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (beta)

the trait bound `u64: std::ops::BitAnd<bool>` is not satisfied

error[E0277]: the trait bound `u64: std::ops::BitAnd<bool>` is not satisfied
   --> arithmetic/curves/src/bn256/assembly.rs:109:57
    |
109 |                   let (d0, carry) = adc(d0, $modulus.0[0] & borrow, 0);
    |                                                           ^ no implementation for `u64 & bool`
    |
   ::: arithmetic/curves/src/bn256/fr.rs:144:1
    |
144 | / assembly_field!(
145 | |     Fr,
146 | |     MODULUS,
147 | |     INV,
...   |
155 | |     R3
156 | | );
    | |_- in this macro invocation
    |
    = help: the trait `~const std::ops::BitAnd<bool>` is not implemented for `u64`
    = help: the following other types implement trait `std::ops::BitAnd<Rhs>`:
              <&'a i128 as std::ops::BitAnd<i128>>
              <&'a i16 as std::ops::BitAnd<i16>>
              <&'a i32 as std::ops::BitAnd<i32>>
              <&'a i64 as std::ops::BitAnd<i64>>
              <&'a i8 as std::ops::BitAnd<i8>>
              <&'a isize as std::ops::BitAnd<isize>>
              <&'a u128 as std::ops::BitAnd<u128>>
              <&'a u16 as std::ops::BitAnd<u16>>
            and 40 others
    = note: this error originates in the macro `assembly_field` (in Nightly builds, run with -Z macro-backtrace for more info)

Check failure on line 104 in arithmetic/curves/src/bn256/assembly.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (beta)

mismatched types

error[E0308]: mismatched types
   --> arithmetic/curves/src/bn256/assembly.rs:104:59
    |
104 |                   let (d0, borrow) = sbb(r4, $modulus.0[0], 0);
    |                                      ---                    ^ expected `bool`, found integer
    |                                      |
    |                                      arguments to this function are incorrect
    |
   ::: arithmetic/curves/src/bn256/fr.rs:144:1
    |
144 | / assembly_field!(
145 | |     Fr,
146 | |     MODULUS,
147 | |     INV,
...   |
155 | |     R3
156 | | );
    | |_- in this macro invocation
    |
note: function defined here
   --> arithmetic/curves/src/arithmetic.rs:81:21
    |
81  | pub(crate) const fn sbb(a: u64, b: u64, borrow: bool) -> (u64, bool) {
    |                     ^^^                 ------------
    = note: this error originates in the macro `assembly_field` (in Nightly builds, run with -Z macro-backtrace for more info)

Check failure on line 101 in arithmetic/curves/src/bn256/assembly.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (beta)

arguments to this function are incorrect

error[E0308]: arguments to this function are incorrect
   --> arithmetic/curves/src/bn256/assembly.rs:101:31
    |
101 |                   let (r7, _) = adc(r7, carry2, carry);
    |                                 ^^^     ------  ----- expected `bool`, found `u64`
    |                                         |
    |                                         expected `u64`, found `bool`
    |
   ::: arithmetic/curves/src/bn256/fr.rs:144:1
    |
144 | / assembly_field!(
145 | |     Fr,
146 | |     MODULUS,
147 | |     INV,
...   |
155 | |     R3
156 | | );
    | |_- in this macro invocation
    |
note: function defined here
   --> arithmetic/curves/src/arithmetic.rs:75:21
    |
75  | pub(crate) const fn adc(a: u64, b: u64, carry: bool) -> (u64, bool) {
    |                     ^^^ ------  ------  -----------
    = note: this error originates in the macro `assembly_field` (in Nightly builds, run with -Z macro-backtrace for more info)
help: swap these arguments
    |
101 |                 let (r7, _) = adc(r7, carry, carry2);
    |                                  ~~~~~~~~~~~~~~~~~~~

Check failure on line 94 in arithmetic/curves/src/bn256/assembly.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (beta)

arguments to this function are incorrect

error[E0308]: arguments to this function are incorrect
   --> arithmetic/curves/src/bn256/assembly.rs:94:36
    |
94  |                   let (r6, carry2) = adc(r6, carry2, carry);
    |                                      ^^^     ------  ----- expected `bool`, found `u64`
    |                                              |
    |                                              expected `u64`, found `bool`
    |
   ::: arithmetic/curves/src/bn256/fr.rs:144:1
    |
144 | / assembly_field!(
145 | |     Fr,
146 | |     MODULUS,
147 | |     INV,
...   |
155 | |     R3
156 | | );
    | |_- in this macro invocation
    |
note: function defined here
   --> arithmetic/curves/src/arithmetic.rs:75:21
    |
75  | pub(crate) const fn adc(a: u64, b: u64, carry: bool) -> (u64, bool) {
    |                     ^^^ ------  ------  -----------
    = note: this error originates in the macro `assembly_field` (in Nightly builds, run with -Z macro-backtrace for more info)
help: swap these arguments
    |
94  |                 let (r6, carry2) = adc(r6, carry, carry2);
    |                                       ~~~~~~~~~~~~~~~~~~~

Check failure on line 87 in arithmetic/curves/src/bn256/assembly.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (beta)

arguments to this function are incorrect

error[E0308]: arguments to this function are incorrect
   --> arithmetic/curves/src/bn256/assembly.rs:87:36
    |
87  |                   let (r5, carry2) = adc(r5, carry2, carry);
    |                                      ^^^     ------  ----- expected `bool`, found `u64`
    |                                              |
    |                                              expected `u64`, found `bool`
    |
   ::: arithmetic/curves/src/bn256/fr.rs:144:1
    |
144 | / assembly_field!(
145 | |     Fr,
146 | |     MODULUS,
147 | |     INV,
...   |
155 | |     R3
156 | | );
    | |_- in this macro invocation
    |
note: function defined here
   --> arithmetic/curves/src/arithmetic.rs:75:21
    |
75  | pub(crate) const fn adc(a: u64, b: u64, carry: bool) -> (u64, bool) {
    |                     ^^^ ------  ------  -----------
    = note: this error originates in the macro `assembly_field` (in Nightly builds, run with -Z macro-backtrace for more info)
help: swap these arguments
    |
87  |                 let (r5, carry2) = adc(r5, carry, carry2);
    |                                       ~~~~~~~~~~~~~~~~~~~

Check failure on line 80 in arithmetic/curves/src/bn256/assembly.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (beta)

mismatched types

error[E0308]: mismatched types
   --> arithmetic/curves/src/bn256/assembly.rs:80:47
    |
80  |                   let (r4, carry2) = adc(r4, 0, carry);
    |                                      ---        ^^^^^ expected `bool`, found `u64`
    |                                      |
    |                                      arguments to this function are incorrect
    |
   ::: arithmetic/curves/src/bn256/fr.rs:144:1
    |
144 | / assembly_field!(
145 | |     Fr,
146 | |     MODULUS,
147 | |     INV,
...   |
155 | |     R3
156 | | );
    | |_- in this macro invocation
    |
note: function defined here
   --> arithmetic/curves/src/arithmetic.rs:75:21
    |
75  | pub(crate) const fn adc(a: u64, b: u64, carry: bool) -> (u64, bool) {
    |                     ^^^                 -----------
    = note: this error originates in the macro `assembly_field` (in Nightly builds, run with -Z macro-backtrace for more info)

Check failure on line 112 in arithmetic/curves/src/bn256/assembly.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (beta)

the trait bound `u64: std::ops::BitAnd<bool>` is not satisfied

error[E0277]: the trait bound `u64: std::ops::BitAnd<bool>` is not satisfied
   --> arithmetic/curves/src/bn256/assembly.rs:112:53
    |
112 |                   let (d3, _) = adc(d3, $modulus.0[3] & borrow, carry);
    |                                                       ^ no implementation for `u64 & bool`
    |
   ::: arithmetic/curves/src/bn256/fq.rs:117:1
    |
117 | / assembly_field!(
118 | |     Fq,
119 | |     MODULUS,
120 | |     INV,
...   |
128 | |     R3
129 | | );
    | |_- in this macro invocation
    |
    = help: the trait `~const std::ops::BitAnd<bool>` is not implemented for `u64`
    = help: the following other types implement trait `std::ops::BitAnd<Rhs>`:
              <&'a i128 as std::ops::BitAnd<i128>>
              <&'a i16 as std::ops::BitAnd<i16>>
              <&'a i32 as std::ops::BitAnd<i32>>
              <&'a i64 as std::ops::BitAnd<i64>>
              <&'a i8 as std::ops::BitAnd<i8>>
              <&'a isize as std::ops::BitAnd<isize>>
              <&'a u128 as std::ops::BitAnd<u128>>
              <&'a u16 as std::ops::BitAnd<u16>>
            and 40 others
    = note: this error originates in the macro `assembly_field` (in Nightly builds, run with -Z macro-backtrace for more info)

Check failure on line 111 in arithmetic/curves/src/bn256/assembly.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (beta)

the trait bound `u64: std::ops::BitAnd<bool>` is not satisfied

error[E0277]: the trait bound `u64: std::ops::BitAnd<bool>` is not satisfied
   --> arithmetic/curves/src/bn256/assembly.rs:111:57
    |
111 |                   let (d2, carry) = adc(d2, $modulus.0[2] & borrow, carry);
    |                                                           ^ no implementation for `u64 & bool`
    |
   ::: arithmetic/curves/src/bn256/fq.rs:117:1
    |
117 | / assembly_field!(
118 | |     Fq,
119 | |     MODULUS,
120 | |     INV,
...   |
128 | |     R3
129 | | );
    | |_- in this macro invocation
    |
    = help: the trait `~const std::ops::BitAnd<bool>` is not implemented for `u64`
    = help: the following other types implement trait `std::ops::BitAnd<Rhs>`:
              <&'a i128 as std::ops::BitAnd<i128>>
              <&'a i16 as std::ops::BitAnd<i16>>
              <&'a i32 as std::ops::BitAnd<i32>>
              <&'a i64 as std::ops::BitAnd<i64>>
              <&'a i8 as std::ops::BitAnd<i8>>
              <&'a isize as std::ops::BitAnd<isize>>
              <&'a u128 as std::ops::BitAnd<u128>>
              <&'a u16 as std::ops::BitAnd<u16>>
            and 40 others
    = note: this error originates in the macro `assembly_field` (in Nightly builds, run with -Z macro-backtrace for more info)

Check failure on line 110 in arithmetic/curves/src/bn256/assembly.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (beta)

the trait bound `u64: std::ops::BitAnd<bool>` is not satisfied

error[E0277]: the trait bound `u64: std::ops::BitAnd<bool>` is not satisfied
   --> arithmetic/curves/src/bn256/assembly.rs:110:57
    |
110 |                   let (d1, carry) = adc(d1, $modulus.0[1] & borrow, carry);
    |                                                           ^ no implementation for `u64 & bool`
    |
   ::: arithmetic/curves/src/bn256/fq.rs:117:1
    |
117 | / assembly_field!(
118 | |     Fq,
119 | |     MODULUS,
120 | |     INV,
...   |
128 | |     R3
129 | | );
    | |_- in this macro invocation
    |
    = help: the trait `~const std::ops::BitAnd<bool>` is not implemented for `u64`
    = help: the following other types implement trait `std::ops::BitAnd<Rhs>`:
              <&'a i128 as std::ops::BitAnd<i128>>
              <&'a i16 as std::ops::BitAnd<i16>>
              <&'a i32 as std::ops::BitAnd<i32>>
              <&'a i64 as std::ops::BitAnd<i64>>
              <&'a i8 as std::ops::BitAnd<i8>>
              <&'a isize as std::ops::BitAnd<isize>>
              <&'a u128 as std::ops::BitAnd<u128>>
              <&'a u16 as std::ops::BitAnd<u16>>
            and 40 others
    = note: this error originates in the macro `assembly_field` (in Nightly builds, run with -Z macro-backtrace for more info)

Check failure on line 109 in arithmetic/curves/src/bn256/assembly.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (beta)

mismatched types

error[E0308]: mismatched types
   --> arithmetic/curves/src/bn256/assembly.rs:109:67
    |
109 |                   let (d0, carry) = adc(d0, $modulus.0[0] & borrow, 0);
    |                                     ---                             ^ expected `bool`, found integer
    |                                     |
    |                                     arguments to this function are incorrect
    |
   ::: arithmetic/curves/src/bn256/fq.rs:117:1
    |
117 | / assembly_field!(
118 | |     Fq,
119 | |     MODULUS,
120 | |     INV,
...   |
128 | |     R3
129 | | );
    | |_- in this macro invocation
    |
note: function defined here
   --> arithmetic/curves/src/arithmetic.rs:75:21
    |
75  | pub(crate) const fn adc(a: u64, b: u64, carry: bool) -> (u64, bool) {
    |                     ^^^                 -----------
    = note: this error originates in the macro `assembly_field` (in Nightly builds, run with -Z macro-backtrace for more info)

Check failure on line 109 in arithmetic/curves/src/bn256/assembly.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (beta)

the trait bound `u64: std::ops::BitAnd<bool>` is not satisfied

error[E0277]: the trait bound `u64: std::ops::BitAnd<bool>` is not satisfied
   --> arithmetic/curves/src/bn256/assembly.rs:109:57
    |
109 |                   let (d0, carry) = adc(d0, $modulus.0[0] & borrow, 0);
    |                                                           ^ no implementation for `u64 & bool`
    |
   ::: arithmetic/curves/src/bn256/fq.rs:117:1
    |
117 | / assembly_field!(
118 | |     Fq,
119 | |     MODULUS,
120 | |     INV,
...   |
128 | |     R3
129 | | );
    | |_- in this macro invocation
    |
    = help: the trait `~const std::ops::BitAnd<bool>` is not implemented for `u64`
    = help: the following other types implement trait `std::ops::BitAnd<Rhs>`:
              <&'a i128 as std::ops::BitAnd<i128>>
              <&'a i16 as std::ops::BitAnd<i16>>
              <&'a i32 as std::ops::BitAnd<i32>>
              <&'a i64 as std::ops::BitAnd<i64>>
              <&'a i8 as std::ops::BitAnd<i8>>
              <&'a isize as std::ops::BitAnd<isize>>
              <&'a u128 as std::ops::BitAnd<u128>>
              <&'a u16 as std::ops::BitAnd<u16>>
            and 40 others
    = note: this error originates in the macro `assembly_field` (in Nightly builds, run with -Z macro-backtrace for more info)

Check failure on line 104 in arithmetic/curves/src/bn256/assembly.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (beta)

mismatched types

error[E0308]: mismatched types
   --> arithmetic/curves/src/bn256/assembly.rs:104:59
    |
104 |                   let (d0, borrow) = sbb(r4, $modulus.0[0], 0);
    |                                      ---                    ^ expected `bool`, found integer
    |                                      |
    |                                      arguments to this function are incorrect
    |
   ::: arithmetic/curves/src/bn256/fq.rs:117:1
    |
117 | / assembly_field!(
118 | |     Fq,
119 | |     MODULUS,
120 | |     INV,
...   |
128 | |     R3
129 | | );
    | |_- in this macro invocation
    |
note: function defined here
   --> arithmetic/curves/src/arithmetic.rs:81:21
    |
81  | pub(crate) const fn sbb(a: u64, b: u64, borrow: bool) -> (u64, bool) {
    |                     ^^^                 ------------
    = note: this error originates in the macro `assembly_field` (in Nightly builds, run with -Z macro-backtrace for more info)

Check failure on line 101 in arithmetic/curves/src/bn256/assembly.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (beta)

arguments to this function are incorrect

error[E0308]: arguments to this function are incorrect
   --> arithmetic/curves/src/bn256/assembly.rs:101:31
    |
101 |                   let (r7, _) = adc(r7, carry2, carry);
    |                                 ^^^     ------  ----- expected `bool`, found `u64`
    |                                         |
    |                                         expected `u64`, found `bool`
    |
   ::: arithmetic/curves/src/bn256/fq.rs:117:1
    |
117 | / assembly_field!(
118 | |     Fq,
119 | |     MODULUS,
120 | |     INV,
...   |
128 | |     R3
129 | | );
    | |_- in this macro invocation
    |
note: function defined here
   --> arithmetic/curves/src/arithmetic.rs:75:21
    |
75  | pub(crate) const fn adc(a: u64, b: u64, carry: bool) -> (u64, bool) {
    |                     ^^^ ------  ------  -----------
    = note: this error originates in the macro `assembly_field` (in Nightly builds, run with -Z macro-backtrace for more info)
help: swap these arguments
    |
101 |                 let (r7, _) = adc(r7, carry, carry2);
    |                                  ~~~~~~~~~~~~~~~~~~~

Check failure on line 94 in arithmetic/curves/src/bn256/assembly.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (beta)

arguments to this function are incorrect

error[E0308]: arguments to this function are incorrect
   --> arithmetic/curves/src/bn256/assembly.rs:94:36
    |
94  |                   let (r6, carry2) = adc(r6, carry2, carry);
    |                                      ^^^     ------  ----- expected `bool`, found `u64`
    |                                              |
    |                                              expected `u64`, found `bool`
    |
   ::: arithmetic/curves/src/bn256/fq.rs:117:1
    |
117 | / assembly_field!(
118 | |     Fq,
119 | |     MODULUS,
120 | |     INV,
...   |
128 | |     R3
129 | | );
    | |_- in this macro invocation
    |
note: function defined here
   --> arithmetic/curves/src/arithmetic.rs:75:21
    |
75  | pub(crate) const fn adc(a: u64, b: u64, carry: bool) -> (u64, bool) {
    |                     ^^^ ------  ------  -----------
    = note: this error originates in the macro `assembly_field` (in Nightly builds, run with -Z macro-backtrace for more info)
help: swap these arguments
    |
94  |                 let (r6, carry2) = adc(r6, carry, carry2);
    |                                       ~~~~~~~~~~~~~~~~~~~

Check failure on line 87 in arithmetic/curves/src/bn256/assembly.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (beta)

arguments to this function are incorrect

error[E0308]: arguments to this function are incorrect
   --> arithmetic/curves/src/bn256/assembly.rs:87:36
    |
87  |                   let (r5, carry2) = adc(r5, carry2, carry);
    |                                      ^^^     ------  ----- expected `bool`, found `u64`
    |                                              |
    |                                              expected `u64`, found `bool`
    |
   ::: arithmetic/curves/src/bn256/fq.rs:117:1
    |
117 | / assembly_field!(
118 | |     Fq,
119 | |     MODULUS,
120 | |     INV,
...   |
128 | |     R3
129 | | );
    | |_- in this macro invocation
    |
note: function defined here
   --> arithmetic/curves/src/arithmetic.rs:75:21
    |
75  | pub(crate) const fn adc(a: u64, b: u64, carry: bool) -> (u64, bool) {
    |                     ^^^ ------  ------  -----------
    = note: this error originates in the macro `assembly_field` (in Nightly builds, run with -Z macro-backtrace for more info)
help: swap these arguments
    |
87  |                 let (r5, carry2) = adc(r5, carry, carry2);
    |                                       ~~~~~~~~~~~~~~~~~~~

Check failure on line 80 in arithmetic/curves/src/bn256/assembly.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (beta)

mismatched types

error[E0308]: mismatched types
   --> arithmetic/curves/src/bn256/assembly.rs:80:47
    |
80  |                   let (r4, carry2) = adc(r4, 0, carry);
    |                                      ---        ^^^^^ expected `bool`, found `u64`
    |                                      |
    |                                      arguments to this function are incorrect
    |
   ::: arithmetic/curves/src/bn256/fq.rs:117:1
    |
117 | / assembly_field!(
118 | |     Fq,
119 | |     MODULUS,
120 | |     INV,
...   |
128 | |     R3
129 | | );
    | |_- in this macro invocation
    |
note: function defined here
   --> arithmetic/curves/src/arithmetic.rs:75:21
    |
75  | pub(crate) const fn adc(a: u64, b: u64, carry: bool) -> (u64, bool) {
    |                     ^^^                 -----------
    = note: this error originates in the macro `assembly_field` (in Nightly builds, run with -Z macro-backtrace for more info)

Check warning on line 121 in arithmetic/curves/src/bn256/fr.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (beta)

unused imports: `field_arithmetic`, `field_common`, `field_specific`

warning: unused imports: `field_arithmetic`, `field_common`, `field_specific`
   --> arithmetic/curves/src/bn256/fr.rs:121:5
    |
121 |     field_arithmetic, field_common, field_specific, impl_add_binop_specify_output,
    |     ^^^^^^^^^^^^^^^^  ^^^^^^^^^^^^  ^^^^^^^^^^^^^^

Check warning on line 4 in arithmetic/curves/src/bn256/fr.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (beta)

unused import: `macx`

warning: unused import: `macx`
 --> arithmetic/curves/src/bn256/fr.rs:4:35
  |
4 | use crate::arithmetic::{adc, mac, macx, sbb};
  |                                   ^^^^

Check warning on line 94 in arithmetic/curves/src/bn256/fq.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (beta)

unused imports: `field_arithmetic`, `field_common`, `field_specific`

warning: unused imports: `field_arithmetic`, `field_common`, `field_specific`
  --> arithmetic/curves/src/bn256/fq.rs:94:5
   |
94 |     field_arithmetic, field_common, field_specific, impl_add_binop_specify_output,
   |     ^^^^^^^^^^^^^^^^  ^^^^^^^^^^^^  ^^^^^^^^^^^^^^