Merge pull request #845 from QED-it/zsa1 #998
Clippy (beta)
121 warnings
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 0 |
Warning | 121 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.90.0-beta.1 (788da80fc 2025-08-04)
- cargo 1.90.0-beta.1 (840b83a10 2025-07-30)
- clippy 0.1.90 (788da80fcf 2025-08-04)
Annotations
Check warning on line 407 in halo2_gadgets/src/utilities.rs
github-actions / Clippy (beta)
an array of `Range` that is only one element
warning: an array of `Range` that is only one element
--> halo2_gadgets/src/utilities.rs:407:47
|
407 | decompose(pallas::Base::random(rng), &[0..255]);
| ^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_range_in_vec_init
= note: `-W clippy::single-range-in-vec-init` implied by `-W clippy::all`
= help: to override `-W clippy::all` add `#[allow(clippy::single_range_in_vec_init)]`
help: if you wanted a `Vec` that contains the entire range, try
|
407 - decompose(pallas::Base::random(rng), &[0..255]);
407 + decompose(pallas::Base::random(rng), &(0..255).collect::<std::vec::Vec<usize>>());
|
help: if you wanted an array of len 255, try
|
407 - decompose(pallas::Base::random(rng), &[0..255]);
407 + decompose(pallas::Base::random(rng), &[0; 255]);
|
Check warning on line 127 in halo2_gadgets/src/utilities.rs
github-actions / Clippy (beta)
use of `default` to create a unit struct
warning: use of `default` to create a unit struct
--> halo2_gadgets/src/utilities.rs:127:23
|
127 | _phantom: 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 118 in halo2_gadgets/src/utilities.rs
github-actions / Clippy (beta)
use of `default` to create a unit struct
warning: use of `default` to create a unit struct
--> halo2_gadgets/src/utilities.rs:118:23
|
118 | _phantom: 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 103 in halo2_gadgets/src/utilities.rs
github-actions / Clippy (beta)
use of `default` to create a unit struct
warning: use of `default` to create a unit struct
--> halo2_gadgets/src/utilities.rs:103:23
|
103 | _phantom: 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 56 in halo2_gadgets/src/utilities/lookup_range_check.rs
github-actions / Clippy (beta)
use of `default` to create a unit struct
warning: use of `default` to create a unit struct
--> halo2_gadgets/src/utilities/lookup_range_check.rs:56:27
|
56 | _phantom: 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 739 in halo2_gadgets/src/sinsemilla.rs
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_gadgets/src/sinsemilla.rs:739:44
|
739 | ... .chain(right.into_iter()),
| ^^^^^------------
| |
| help: consider removing the `.into_iter()`
|
note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()`
--> /rustc/788da80fcfcef3f34c90def5baa32813e39a1a41/library/core/src/iter/traits/iterator.rs:497:12
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
Check warning on line 738 in halo2_gadgets/src/sinsemilla.rs
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_gadgets/src/sinsemilla.rs:738:44
|
738 | ... .chain(left.into_iter())
| ^^^^------------
| |
| help: consider removing the `.into_iter()`
|
note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()`
--> /rustc/788da80fcfcef3f34c90def5baa32813e39a1a41/library/core/src/iter/traits/iterator.rs:497: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 warning on line 154 in halo2_proofs/src/poly/commitment.rs
github-actions / Clippy (beta)
hiding a lifetime that's elided elsewhere is confusing
warning: hiding a lifetime that's elided elsewhere is confusing
--> halo2_proofs/src/poly/commitment.rs:154:22
|
154 | pub fn empty_msm(&self) -> MSM<C> {
| ^^^^^ ------ the same lifetime is hidden here
| |
| the lifetime is elided here
|
= help: the same lifetime is referred to in inconsistent ways, making the signature confusing
help: use `'_` for type paths
|
154 | pub fn empty_msm(&self) -> MSM<'_, C> {
| +++
Check warning on line 92 in halo2_proofs/src/plonk/vanishing/verifier.rs
github-actions / Clippy (beta)
hiding a lifetime that's elided elsewhere is confusing
warning: hiding a lifetime that's elided elsewhere is confusing
--> halo2_proofs/src/plonk/vanishing/verifier.rs:92:17
|
92 | params: &Params<C>,
| ^^^^^^^^^^ the lifetime is elided here
...
96 | ) -> Evaluated<C> {
| ------------ the same lifetime is hidden here
|
= help: the same lifetime is referred to in inconsistent ways, making the signature confusing
= note: `#[warn(mismatched_lifetime_syntaxes)]` on by default
help: use `'_` for type paths
|
96 | ) -> Evaluated<'_, C> {
| +++
Check warning on line 284 in halo2_gadgets/src/sha256/table16/compression/compression_gates.rs
github-actions / Clippy (beta)
very complex type used. Consider factoring parts into `type` definitions
warning: very complex type used. Consider factoring parts into `type` definitions
--> halo2_gadgets/src/sha256/table16/compression/compression_gates.rs:280:10
|
280 | ) -> Constraints<
| __________^
281 | | F,
282 | | (&'static str, Expression<F>),
283 | | impl Iterator<Item = (&'static str, Expression<F>)>,
284 | | > {
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity
Check warning on line 1071 in halo2_proofs/src/dev.rs
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:1071:30
|
1071 | ... .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 109 in halo2_gadgets/src/sha256/table16/compression/compression_gates.rs
github-actions / Clippy (beta)
very complex type used. Consider factoring parts into `type` definitions
warning: very complex type used. Consider factoring parts into `type` definitions
--> halo2_gadgets/src/sha256/table16/compression/compression_gates.rs:105:10
|
105 | ) -> Constraints<
| __________^
106 | | F,
107 | | (&'static str, Expression<F>),
108 | | impl Iterator<Item = (&'static str, Expression<F>)>,
109 | | > {
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity
Check warning on line 41 in halo2_gadgets/src/sha256/table16/compression/compression_gates.rs
github-actions / Clippy (beta)
very complex type used. Consider factoring parts into `type` definitions
warning: very complex type used. Consider factoring parts into `type` definitions
--> halo2_gadgets/src/sha256/table16/compression/compression_gates.rs:37:10
|
37 | ) -> Constraints<
| __________^
38 | | F,
39 | | (&'static str, Expression<F>),
40 | | impl Iterator<Item = (&'static str, Expression<F>)>,
41 | | > {
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity
= note: `-W clippy::type-complexity` implied by `-W clippy::all`
= help: to override `-W clippy::all` add `#[allow(clippy::type_complexity)]`
Check warning on line 198 in halo2_gadgets/src/poseidon.rs
github-actions / Clippy (beta)
use of `default` to create a unit struct
warning: use of `default` to create a unit struct
--> halo2_gadgets/src/poseidon.rs:198:22
|
198 | _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 152 in halo2_gadgets/src/poseidon.rs
github-actions / Clippy (beta)
use of `default` to create a unit struct
warning: use of `default` to create a unit struct
--> halo2_gadgets/src/poseidon.rs:152:22
|
152 | _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
= 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 693 in halo2_proofs/src/dev.rs
github-actions / Clippy (beta)
the borrowed expression implements the required traits
warning: the borrowed expression implements the required traits
--> halo2_proofs/src/dev.rs:688:41
|
688 | / ... &util::load_instance(
689 | | ... n,
690 | | ... row,
691 | | ... &self.cs.instance_queries,
692 | | ... &self.instance,
693 | | ... ),
| |_______________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
help: change this to
|
688 ~ util::load_instance(
689 + n,
690 + row,
691 + &self.cs.instance_queries,
692 + &self.instance,
693 ~ ),
|
Check warning on line 687 in halo2_proofs/src/dev.rs
github-actions / Clippy (beta)
the borrowed expression implements the required traits
warning: the borrowed expression implements the required traits
--> halo2_proofs/src/dev.rs:687:41
|
687 | ... &util::load(n, row, &self.cs.advice_queries, &self.advice),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `util::load(n, row, &self.cs.advice_queries, &self.advice)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
Check warning on line 686 in halo2_proofs/src/dev.rs
github-actions / Clippy (beta)
the borrowed expression implements the required traits
warning: the borrowed expression implements the required traits
--> halo2_proofs/src/dev.rs:686:41
|
686 | ... &util::load(n, row, &self.cs.fixed_queries, &self.fixed),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `util::load(n, row, &self.cs.fixed_queries, &self.fixed)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
Check warning on line 517 in halo2_gadgets/src/poseidon/pow5.rs
github-actions / Clippy (beta)
the borrowed expression implements the required traits
warning: the borrowed expression implements the required traits
--> halo2_gadgets/src/poseidon/pow5.rs:517:77
|
517 | let r_0 = (p[0] + config.round_constants[round + 1][0]).pow(&config.alpha);
| ^^^^^^^^^^^^^ help: change this to: `config.alpha`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
Check warning on line 477 in halo2_gadgets/src/poseidon/pow5.rs
github-actions / Clippy (beta)
the borrowed expression implements the required traits
warning: the borrowed expression implements the required traits
--> halo2_gadgets/src/poseidon/pow5.rs:477:73
|
477 | let r_0 = (p[0] + config.round_constants[round][0]).pow(&config.alpha);
| ^^^^^^^^^^^^^ help: change this to: `config.alpha`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
Check warning on line 451 in halo2_gadgets/src/poseidon/pow5.rs
github-actions / Clippy (beta)
the borrowed expression implements the required traits
warning: the borrowed expression implements the required traits
--> halo2_gadgets/src/poseidon/pow5.rs:451:62
|
451 | let r: Value<Vec<F>> = q.map(|q| q.map(|q| q.pow(&config.alpha))).collect();
| ^^^^^^^^^^^^^ help: change this to: `config.alpha`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
Check warning on line 265 in halo2_gadgets/src/poseidon/pow5.rs
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_gadgets/src/poseidon/pow5.rs:256:58
|
256 | let state = (0..config.half_full_rounds).fold(Ok(state), |res, r| {
| __________________________________________________________^
257 | | res.and_then(|state| {
258 | | state.full_round(
259 | | &mut region,
... |
264 | | })
265 | | })?;
| |__________________^ help: use `try_fold` instead: `try_fold(state, |res, r| ...)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_try_fold
Check warning on line 254 in halo2_gadgets/src/poseidon/pow5.rs
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_gadgets/src/poseidon/pow5.rs:245:61
|
245 | let state = (0..config.half_partial_rounds).fold(Ok(state), |res, r| {
| _____________________________________________________________^
246 | | res.and_then(|state| {
247 | | state.partial_round(
248 | | &mut region,
... |
253 | | })
254 | | })?;
| |__________________^ help: use `try_fold` instead: `try_fold(state, |res, r| ...)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_try_fold
Check warning on line 243 in halo2_gadgets/src/poseidon/pow5.rs
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_gadgets/src/poseidon/pow5.rs:241:58
|
241 | let state = (0..config.half_full_rounds).fold(Ok(state), |res, r| {
| __________________________________________________________^
242 | | res.and_then(|state| state.full_round(&mut region, config, r, r))
243 | | })?;
| |__________________^ help: use `try_fold` instead: `try_fold(state, |res, r| ...)`
|
= 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 395 in halo2_gadgets/src/ecc/chip/mul_fixed.rs
github-actions / Clippy (beta)
the borrowed expression implements the required traits
warning: the borrowed expression implements the required traits
--> halo2_gadgets/src/ecc/chip/mul_fixed.rs:395:42
|
395 | .map(|k| k * (*H_SCALAR).pow(&[(NUM_WINDOWS - 1) as u64, 0, 0, 0]) - offset_acc);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `[(NUM_WINDOWS - 1) as u64, 0, 0, 0]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args