Skip to content

Extract zsa (optimization) related changes into separate modules (...… #269

Extract zsa (optimization) related changes into separate modules (...…

Extract zsa (optimization) related changes into separate modules (...… #269

GitHub Actions / Clippy (beta) failed Apr 2, 2024 in 1s

Clippy (beta)

8 errors, 124 warnings

Details

Results

Message level Amount
Internal compiler error 0
Error 8
Warning 124
Note 0
Help 0

Versions

  • rustc 1.78.0-beta.4 (c1195518c 2024-03-29)
  • cargo 1.78.0-beta.4 (54d8815d0 2024-03-26)
  • clippy 0.1.78 (c119551 2024-03-29)

Annotations

Check warning on line 1066 in halo2_proofs/src/dev.rs

See this annotation in the file changed.

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

usage of `Iterator::fold` on a type that implements `Try`

warning: usage of `Iterator::fold` on a type that implements `Try`
    --> halo2_proofs/src/dev.rs:1066:30
     |
1066 | ...                   .fold(Ok(()), |acc, res| acc.and(res))
     |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `try_fold` instead: `try_fold((), |acc, res| ...)`
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_try_fold
     = note: `-W clippy::manual-try-fold` implied by `-W clippy::all`
     = help: to override `-W clippy::all` add `#[allow(clippy::manual_try_fold)]`

Check warning on line 414 in halo2_proofs/src/dev/cost.rs

See this annotation in the file changed.

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

use of `default` to create a unit struct

warning: use of `default` to create a unit struct
   --> halo2_proofs/src/dev/cost.rs:414:33
    |
414 |             _marker: PhantomData::default(),
    |                                 ^^^^^^^^^^^ help: remove this call to `default`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#default_constructed_unit_structs

Check warning on line 371 in halo2_proofs/src/dev/cost.rs

See this annotation in the file changed.

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

use of `default` to create a unit struct

warning: use of `default` to create a unit struct
   --> halo2_proofs/src/dev/cost.rs:371:33
    |
371 |             _marker: PhantomData::default(),
    |                                 ^^^^^^^^^^^ help: remove this call to `default`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#default_constructed_unit_structs

Check warning on line 328 in halo2_proofs/src/dev/cost.rs

See this annotation in the file changed.

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

use of `default` to create a unit struct

warning: use of `default` to create a unit struct
   --> halo2_proofs/src/dev/cost.rs:328:33
    |
328 |             _marker: PhantomData::default(),
    |                                 ^^^^^^^^^^^ help: remove this call to `default`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#default_constructed_unit_structs

Check warning on line 174 in halo2_proofs/src/poly.rs

See this annotation in the file changed.

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

explicit call to `.into_iter()` in function argument accepting `IntoIterator`

warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator`
   --> halo2_proofs/src/poly.rs:174:22
    |
174 |                 .zip(inv_denoms.into_iter())
    |                      ^^^^^^^^^^^^^^^^^^^^^^ help: consider removing the `.into_iter()`: `inv_denoms`
    |
note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()`
   --> /rustc/c1195518c8ad7f37d15ecb82f39dec3da97f9c2f/library/core/src/iter/traits/iterator.rs:602:12
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion

Check warning on line 167 in halo2_proofs/src/poly.rs

See this annotation in the file changed.

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

this bound is already specified as the supertrait of `ExactSizeIterator`

warning: this bound is already specified as the supertrait of `ExactSizeIterator`
   --> halo2_proofs/src/poly.rs:167:26
    |
167 |         inv_denoms: impl Iterator<Item = F> + ExactSizeIterator,
    |                          ^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implied_bounds_in_impls
    = note: `-W clippy::implied-bounds-in-impls` implied by `-W clippy::all`
    = help: to override `-W clippy::all` add `#[allow(clippy::implied_bounds_in_impls)]`
help: try removing this bound
    |
167 -         inv_denoms: impl Iterator<Item = F> + ExactSizeIterator,
167 +         inv_denoms: impl ExactSizeIterator<Item = F>,
    |

Check warning on line 159 in halo2_proofs/src/poly.rs

See this annotation in the file changed.

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

explicit call to `.into_iter()` in function argument accepting `IntoIterator`

warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator`
   --> halo2_proofs/src/poly.rs:159:14
    |
159 |         .zip(assigned_denominators.into_iter())
    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing the `.into_iter()`: `assigned_denominators`
    |
note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()`
   --> /rustc/c1195518c8ad7f37d15ecb82f39dec3da97f9c2f/library/core/src/iter/traits/iterator.rs:602:12
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion

Check warning on line 208 in halo2_proofs/src/poly/multiopen.rs

See this annotation in the file changed.

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

assigning the result of `Clone::clone()` may be inefficient

warning: assigning the result of `Clone::clone()` may be inefficient
   --> halo2_proofs/src/poly/multiopen.rs:208:17
    |
208 |                 point_index_set = point_idx_set.clone();
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_from()`: `point_index_set.clone_from(point_idx_set)`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assigning_clones
    = note: `-W clippy::assigning-clones` implied by `-W clippy::all`
    = help: to override `-W clippy::all` add `#[allow(clippy::assigning_clones)]`

Check warning on line 105 in halo2_proofs/src/poly/multiopen/prover.rs

See this annotation in the file changed.

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

explicit call to `.into_iter()` in function argument accepting `IntoIterator`

warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator`
   --> halo2_proofs/src/poly/multiopen/prover.rs:105:58
    |
105 |     let (p_poly, p_poly_blind) = q_polys.into_iter().zip(q_blinds.into_iter()).fold(
    |                                                          ^^^^^^^^^^^^^^^^^^^^ help: consider removing the `.into_iter()`: `q_blinds`
    |
note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()`
   --> /rustc/c1195518c8ad7f37d15ecb82f39dec3da97f9c2f/library/core/src/iter/traits/iterator.rs:602:12
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion

Check warning on line 124 in halo2_proofs/src/poly/evaluator.rs

See this annotation in the file changed.

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

use of `default` to create a unit struct

warning: use of `default` to create a unit struct
   --> halo2_proofs/src/poly/evaluator.rs:124:36
    |
124 |             _evaluator: PhantomData::default(),
    |                                    ^^^^^^^^^^^ help: remove this call to `default`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#default_constructed_unit_structs

Check warning on line 78 in halo2_proofs/src/poly/evaluator.rs

See this annotation in the file changed.

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

use of `default` to create a unit struct

warning: use of `default` to create a unit struct
  --> halo2_proofs/src/poly/evaluator.rs:78:36
   |
78 |             _evaluator: PhantomData::default(),
   |                                    ^^^^^^^^^^^ help: remove this call to `default`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#default_constructed_unit_structs
   = note: `-W clippy::default-constructed-unit-structs` implied by `-W clippy::all`
   = help: to override `-W clippy::all` add `#[allow(clippy::default_constructed_unit_structs)]`

Check warning on line 559 in halo2_proofs/src/poly/domain.rs

See this annotation in the file changed.

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

the borrowed expression implements the required traits

warning: the borrowed expression implements the required traits
   --> halo2_proofs/src/poly/domain.rs:559:20
    |
559 |     let xn = x.pow(&[8, 0, 0, 0]);
    |                    ^^^^^^^^^^^^^ help: change this to: `[8, 0, 0, 0]`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args

Check warning on line 549 in halo2_proofs/src/poly/domain.rs

See this annotation in the file changed.

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

the borrowed expression implements the required traits

warning: the borrowed expression implements the required traits
   --> halo2_proofs/src/poly/domain.rs:549:38
    |
549 |         points.push(domain.omega.pow(&[i, 0, 0, 0]));
    |                                      ^^^^^^^^^^^^^ help: change this to: `[i, 0, 0, 0]`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args

Check warning on line 322 in halo2_proofs/src/plonk/verifier.rs

See this annotation in the file changed.

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

explicit call to `.into_iter()` in function argument accepting `IntoIterator`

warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator`
   --> halo2_proofs/src/plonk/verifier.rs:319:25
    |
319 | /                         lookups
320 | |                             .iter()
321 | |                             .flat_map(move |p| p.queries(vk, x))
322 | |                             .into_iter(),
    | |________________________________________^
    |
note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()`
   --> /rustc/c1195518c8ad7f37d15ecb82f39dec3da97f9c2f/library/core/src/iter/traits/iterator.rs:483:12
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
help: consider removing the `.into_iter()`
    |
319 ~                         lookups
320 +                             .iter()
321 ~                             .flat_map(move |p| p.queries(vk, x)),
    |

Check warning on line 276 in halo2_proofs/src/plonk/verifier.rs

See this annotation in the file changed.

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

explicit call to `.into_iter()` in function argument accepting `IntoIterator`

warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator`
   --> halo2_proofs/src/plonk/verifier.rs:259:25
    |
259 | /                         lookups
260 | |                             .iter()
261 | |                             .zip(vk.cs.lookups.iter())
262 | |                             .flat_map(move |(p, argument)| {
...   |
275 | |                             })
276 | |                             .into_iter(),
    | |________________________________________^
    |
note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()`
   --> /rustc/c1195518c8ad7f37d15ecb82f39dec3da97f9c2f/library/core/src/iter/traits/iterator.rs:483:12
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
help: consider removing the `.into_iter()`
    |
259 ~                         lookups
260 +                             .iter()
261 +                             .zip(vk.cs.lookups.iter())
262 +                             .flat_map(move |(p, argument)| {
263 +                                 p.expressions(
264 +                                     l_0,
265 +                                     l_last,
266 +                                     l_blind,
267 +                                     argument,
268 +                                     theta,
269 +                                     beta,
270 +                                     gamma,
271 +                                     advice_evals,
272 +                                     fixed_evals,
273 +                                     instance_evals,
274 +                                 )
275 ~                             }),
    |

Check warning on line 206 in halo2_proofs/src/plonk/verifier.rs

See this annotation in the file changed.

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

the borrowed expression implements the required traits

warning: the borrowed expression implements the required traits
   --> halo2_proofs/src/plonk/verifier.rs:206:24
    |
206 |         let xn = x.pow(&[params.n, 0, 0, 0]);
    |                        ^^^^^^^^^^^^^^^^^^^^ help: change this to: `[params.n, 0, 0, 0]`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args

Check warning on line 707 in halo2_proofs/src/plonk/prover.rs

See this annotation in the file changed.

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

explicit call to `.into_iter()` in function argument accepting `IntoIterator`

warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator`
   --> halo2_proofs/src/plonk/prover.rs:707:24
    |
707 |                 .chain(lookups.iter().flat_map(move |p| p.open(pk, x)).into_iter())
    |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing the `.into_iter()`: `lookups.iter().flat_map(move |p| p.open(pk, x))`
    |
note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()`
   --> /rustc/c1195518c8ad7f37d15ecb82f39dec3da97f9c2f/library/core/src/iter/traits/iterator.rs:483:12
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion

Check warning on line 599 in halo2_proofs/src/plonk/prover.rs

See this annotation in the file changed.

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

the borrowed expression implements the required traits

warning: the borrowed expression implements the required traits
   --> halo2_proofs/src/plonk/prover.rs:599:20
    |
599 |     let xn = x.pow(&[params.n, 0, 0, 0]);
    |                    ^^^^^^^^^^^^^^^^^^^^ help: change this to: `[params.n, 0, 0, 0]`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
    = note: `-W clippy::needless-borrows-for-generic-args` implied by `-W clippy::all`
    = help: to override `-W clippy::all` add `#[allow(clippy::needless_borrows_for_generic_args)]`

Check warning on line 581 in halo2_proofs/src/plonk/prover.rs

See this annotation in the file changed.

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

explicit call to `.into_iter()` in function argument accepting `IntoIterator`

warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator`
   --> halo2_proofs/src/plonk/prover.rs:581:28
    |
581 |                     .chain(permutation_expressions.into_iter())
    |                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing the `.into_iter()`: `permutation_expressions`
    |
note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()`
   --> /rustc/c1195518c8ad7f37d15ecb82f39dec3da97f9c2f/library/core/src/iter/traits/iterator.rs:483:12
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion

Check warning on line 547 in halo2_proofs/src/plonk/prover.rs

See this annotation in the file changed.

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

explicit call to `.into_iter()` in function argument accepting `IntoIterator`

warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator`
   --> halo2_proofs/src/plonk/prover.rs:547:14
    |
547 |         .zip(lookup_expressions.into_iter())
    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing the `.into_iter()`: `lookup_expressions`
    |
note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()`
   --> /rustc/c1195518c8ad7f37d15ecb82f39dec3da97f9c2f/library/core/src/iter/traits/iterator.rs:602:12
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion

Check warning on line 546 in halo2_proofs/src/plonk/prover.rs

See this annotation in the file changed.

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

explicit call to `.into_iter()` in function argument accepting `IntoIterator`

warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator`
   --> halo2_proofs/src/plonk/prover.rs:546:14
    |
546 |         .zip(permutation_expressions.into_iter())
    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing the `.into_iter()`: `permutation_expressions`
    |
note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()`
   --> /rustc/c1195518c8ad7f37d15ecb82f39dec3da97f9c2f/library/core/src/iter/traits/iterator.rs:602:12
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion

Check failure on line 209 in halo2_gadgets/src/utilities_opt/cond_swap.rs

See this annotation in the file changed.

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

this function takes 4 arguments but 3 arguments were supplied

error[E0061]: this function takes 4 arguments but 3 arguments were supplied
   --> halo2_gadgets/src/utilities_opt/cond_swap.rs:209:35
    |
209 |                 let range_check = LookupRangeCheckConfig::configure(meta, advices[9], table_idx);
    |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^----------------------------- an argument of type `std::option::Option<halo2_proofs::plonk::TableColumn>` is missing
    |
note: associated function defined here
   --> halo2_gadgets/src/utilities/lookup_range_check.rs:90:12
    |
90  |     pub fn configure(
    |            ^^^^^^^^^
91  |         meta: &mut ConstraintSystem<F>,
    |         ------------------------------
92  |         running_sum: Column<Advice>,
    |         ---------------------------
93  |         table_idx: TableColumn,
    |         ----------------------
94  |         table_range_check_tag: Option<TableColumn>,
    |         ------------------------------------------
help: provide the argument
    |
209 |                 let range_check = LookupRangeCheckConfig::configure(meta, advices[9], table_idx, /* std::option::Option<halo2_proofs::plonk::TableColumn> */);
    |                                                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Check warning on line 1261 in halo2_proofs/src/plonk/circuit.rs

See this annotation in the file changed.

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

explicit call to `.into_iter()` in function argument accepting `IntoIterator`

warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator`
    --> halo2_proofs/src/plonk/circuit.rs:1261:22
     |
1261 |                 .zip(degrees.into_iter())
     |                      ^^^^^^^^^^^^^^^^^^^ help: consider removing the `.into_iter()`: `degrees`
     |
note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()`
    --> /rustc/c1195518c8ad7f37d15ecb82f39dec3da97f9c2f/library/core/src/iter/traits/iterator.rs:602:12
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion

Check warning on line 893 in halo2_proofs/src/plonk/circuit.rs

See this annotation in the file changed.

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

explicit call to `.into_iter()` in function argument accepting `IntoIterator`

warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator`
   --> halo2_proofs/src/plonk/circuit.rs:893:18
    |
893 |             .zip(self.constraints.into_iter())
    |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing the `.into_iter()`: `self.constraints`
    |
note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()`
   --> /rustc/c1195518c8ad7f37d15ecb82f39dec3da97f9c2f/library/core/src/iter/traits/iterator.rs:602:12
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
    = note: `-W clippy::useless-conversion` implied by `-W clippy::all`
    = help: to override `-W clippy::all` add `#[allow(clippy::useless_conversion)]`

Check failure on line 580 in halo2_gadgets/src/sinsemilla.rs

See this annotation in the file changed.

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

this function takes 4 arguments but 3 arguments were supplied

error[E0061]: this function takes 4 arguments but 3 arguments were supplied
   --> halo2_gadgets/src/sinsemilla.rs:580:31
    |
580 |             let range_check = LookupRangeCheckConfig::configure(meta, advices[9], table_idx);
    |                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^----------------------------- an argument of type `std::option::Option<halo2_proofs::plonk::TableColumn>` is missing
    |
note: associated function defined here
   --> halo2_gadgets/src/utilities/lookup_range_check.rs:90:12
    |
90  |     pub fn configure(
    |            ^^^^^^^^^
91  |         meta: &mut ConstraintSystem<F>,
    |         ------------------------------
92  |         running_sum: Column<Advice>,
    |         ---------------------------
93  |         table_idx: TableColumn,
    |         ----------------------
94  |         table_range_check_tag: Option<TableColumn>,
    |         ------------------------------------------
help: provide the argument
    |
580 |             let range_check = LookupRangeCheckConfig::configure(meta, advices[9], table_idx, /* std::option::Option<halo2_proofs::plonk::TableColumn> */);
    |                                                                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~