fmt #12
Clippy (beta)
228 warnings
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 0 |
Warning | 228 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.76.0-beta.1 (0e09125c6 2023-12-21)
- cargo 1.76.0-beta.1 (1a2666ddd 2023-12-17)
- clippy 0.1.76 (0e09125 2023-12-21)
Annotations
Check warning on line 436 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:436:47
|
436 | 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
|
436 | decompose(pallas::Base::random(rng), &(0..255).collect::<std::vec::Vec<usize>>());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
help: if you wanted an array of len 255, try
|
436 | decompose(pallas::Base::random(rng), &[0; 255]);
| ~~~~~~
Check warning on line 129 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:129:34
|
129 | _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 120 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:120:34
|
120 | _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 105 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:105:34
|
105 | _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 52 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:52:38
|
52 | _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 126 in halo2_gadgets/src/utilities/double_and_add.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/utilities/double_and_add.rs:126:19
|
126 | selector: &dyn Fn(&mut VirtualCells<C::Base>) -> Expression<C::Base>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity
Check warning on line 101 in halo2_gadgets/src/utilities/double_and_add.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/utilities/double_and_add.rs:101:19
|
101 | selector: &dyn Fn(&mut VirtualCells<C::Base>) -> Expression<C::Base>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity
Check warning on line 79 in halo2_gadgets/src/utilities/double_and_add.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/utilities/double_and_add.rs:79:28
|
79 | gradient_selector: &dyn Fn(&mut VirtualCells<C::Base>) -> Expression<C::Base>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity
Check warning on line 78 in halo2_gadgets/src/utilities/double_and_add.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/utilities/double_and_add.rs:78:26
|
78 | secant_selector: &dyn Fn(&mut VirtualCells<C::Base>) -> Expression<C::Base>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= 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 659 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:659:48
|
659 | ... .chain(right.into_iter()),
| ^^^^^^^^^^^^^^^^^ help: consider removing the `.into_iter()`: `right`
|
note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()`
--> /rustc/0e09125c6c3c2fd70d7de961bcf0e51575235fad/library/core/src/iter/traits/iterator.rs:524:12
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
Check warning on line 658 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:658:48
|
658 | ... .chain(left.into_iter())
| ^^^^^^^^^^^^^^^^ help: consider removing the `.into_iter()`: `left`
|
note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()`
--> /rustc/0e09125c6c3c2fd70d7de961bcf0e51575235fad/library/core/src/iter/traits/iterator.rs:524: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 95 in halo2/src/transcript.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/src/transcript.rs:95:10
|
95 | ) -> Result<RangeConstrained<C::Base, AssignedCell<C::Base, C::Base>>, Error> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= 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 43 in halo2/src/accumulator.rs
github-actions / Clippy (beta)
an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true
warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true
--> halo2/src/accumulator.rs:43:1
|
43 | impl<C: CurveAffine> Into<Instance> for SplitAccumulator<C> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into
= note: `-W clippy::from-over-into` implied by `-W clippy::all`
= help: to override `-W clippy::all` add `#[allow(clippy::from_over_into)]`
help: replace the `Into` implementation with `From<accumulator::SplitAccumulator<C>>`
|
43 ~ impl<C: CurveAffine> From<SplitAccumulator<C>> for Instance {
44 ~ fn from(val: SplitAccumulator<C>) -> Self {
|
Check warning on line 531 in halo2/src/accumulator/verifier.rs
github-actions / Clippy (beta)
this expression creates a reference which is immediately dereferenced by the compiler
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> halo2/src/accumulator/verifier.rs:531:28
|
531 | instances: &self.instances,
| ^^^^^^^^^^^^^^^ help: change this to: `self.instances`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
Check warning on line 471 in halo2/src/accumulator/verifier.rs
github-actions / Clippy (beta)
this expression creates a reference which is immediately dereferenced by the compiler
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> halo2/src/accumulator/verifier.rs:471:28
|
471 | instances: &self.instances,
| ^^^^^^^^^^^^^^^ help: change this to: `self.instances`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
= note: `-W clippy::needless-borrow` implied by `-W clippy::all`
= help: to override `-W clippy::all` add `#[allow(clippy::needless_borrow)]`
Check warning on line 92 in halo2/src/transcript.rs
github-actions / Clippy (beta)
method `squeeze_challenge` is never used
warning: method `squeeze_challenge` is never used
--> halo2/src/transcript.rs:92:12
|
38 | / impl<C, TranscriptChip> Transcript<C, TranscriptChip>
39 | | where
40 | | C: CurveAffine,
41 | | TranscriptChip: TranscriptInstructions<C>,
| |______________________________________________- method in this implementation
...
92 | pub fn squeeze_challenge<const LENGTH: usize>(
| ^^^^^^^^^^^^^^^^^
Check warning on line 17 in halo2/src/prover.rs
github-actions / Clippy (beta)
struct `Verifier` is never constructed
warning: struct `Verifier` is never constructed
--> halo2/src/prover.rs:17:8
|
17 | struct Verifier<C, E, EndoscaleChip, TranscriptChip, TR>
| ^^^^^^^^
Check warning on line 14 in halo2/src/prover.rs
github-actions / Clippy (beta)
struct `AppCircuit` is never constructed
warning: struct `AppCircuit` is never constructed
--> halo2/src/prover.rs:14:8
|
14 | struct AppCircuit {}
| ^^^^^^^^^^
Check warning on line 435 in halo2/src/accumulator/verifier.rs
github-actions / Clippy (beta)
function `endoscale_chip` is never used
warning: function `endoscale_chip` is never used
--> halo2/src/accumulator/verifier.rs:435:8
|
435 | fn endoscale_chip<C: CurveAffine, E: EndoscaleInstructions<C>>() -> E
| ^^^^^^^^^^^^^^
Check warning on line 431 in halo2/src/accumulator/verifier.rs
github-actions / Clippy (beta)
function `transcript_chip` is never used
warning: function `transcript_chip` is never used
--> halo2/src/accumulator/verifier.rs:431:8
|
431 | fn transcript_chip<C: CurveAffine, T: TranscriptInstructions<C>>() -> T {
| ^^^^^^^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
Check warning on line 63 in halo2/src/accumulator/verifier.rs
github-actions / Clippy (beta)
trait `accumulator::Accumulator<C>` is more private than the item `accumulator::verifier::Verifier::<C, E, EndoscaleChip, TranscriptChip, TR>::verify_proof`
warning: trait `accumulator::Accumulator<C>` is more private than the item `accumulator::verifier::Verifier::<C, E, EndoscaleChip, TranscriptChip, TR>::verify_proof`
--> halo2/src/accumulator/verifier.rs:57:5
|
57 | / pub fn verify_proof<A: Accumulator<C>>(
58 | | &mut self,
59 | | mut layouter: impl Layouter<C::Base>,
60 | | proof: Value<TR>,
61 | | instances: &[Instance],
62 | | is_base_case: Value<bool>,
63 | | ) -> Result<(Value<bool>, A::Output), Error> {
| |________________________________________________^ method `accumulator::verifier::Verifier::<C, E, EndoscaleChip, TranscriptChip, TR>::verify_proof` is reachable at visibility `pub(crate)`
|
note: but trait `accumulator::Accumulator<C>` is only usable at visibility `pub(self)`
--> halo2/src/accumulator.rs:12:1
|
12 | trait Accumulator<C: CurveAffine> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Check warning on line 63 in halo2/src/accumulator/verifier.rs
github-actions / Clippy (beta)
associated type `accumulator::Accumulator::Output` is more private than the item `accumulator::verifier::Verifier::<C, E, EndoscaleChip, TranscriptChip, TR>::verify_proof`
warning: associated type `accumulator::Accumulator::Output` is more private than the item `accumulator::verifier::Verifier::<C, E, EndoscaleChip, TranscriptChip, TR>::verify_proof`
--> halo2/src/accumulator/verifier.rs:57:5
|
57 | / pub fn verify_proof<A: Accumulator<C>>(
58 | | &mut self,
59 | | mut layouter: impl Layouter<C::Base>,
60 | | proof: Value<TR>,
61 | | instances: &[Instance],
62 | | is_base_case: Value<bool>,
63 | | ) -> Result<(Value<bool>, A::Output), Error> {
| |________________________________________________^ method `accumulator::verifier::Verifier::<C, E, EndoscaleChip, TranscriptChip, TR>::verify_proof` is reachable at visibility `pub(crate)`
|
note: but associated type `accumulator::Accumulator::Output` is only usable at visibility `pub(self)`
--> halo2/src/accumulator.rs:16:5
|
16 | type Output: Into<Instance> + Copy;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: `#[warn(private_interfaces)]` on by default
Check warning on line 63 in halo2/src/accumulator/verifier.rs
github-actions / Clippy (beta)
trait `accumulator::Accumulator<C>` is more private than the item `accumulator::verifier::Verifier::<C, E, EndoscaleChip, TranscriptChip, TR>::verify_proof`
warning: trait `accumulator::Accumulator<C>` is more private than the item `accumulator::verifier::Verifier::<C, E, EndoscaleChip, TranscriptChip, TR>::verify_proof`
--> halo2/src/accumulator/verifier.rs:57:5
|
57 | / pub fn verify_proof<A: Accumulator<C>>(
58 | | &mut self,
59 | | mut layouter: impl Layouter<C::Base>,
60 | | proof: Value<TR>,
61 | | instances: &[Instance],
62 | | is_base_case: Value<bool>,
63 | | ) -> Result<(Value<bool>, A::Output), Error> {
| |________________________________________________^ method `accumulator::verifier::Verifier::<C, E, EndoscaleChip, TranscriptChip, TR>::verify_proof` is reachable at visibility `pub(crate)`
|
note: but trait `accumulator::Accumulator<C>` is only usable at visibility `pub(self)`
--> halo2/src/accumulator.rs:12:1
|
12 | trait Accumulator<C: CurveAffine> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: `#[warn(private_bounds)]` on by default
Check warning on line 64 in halo2/src/accumulator.rs
github-actions / Clippy (beta)
unused variable: `is_base_case`
warning: unused variable: `is_base_case`
--> halo2/src/accumulator.rs:64:9
|
64 | is_base_case: Value<bool>,
| ^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_is_base_case`
Check warning on line 593 in halo2/src/accumulator/verifier.rs
github-actions / Clippy (beta)
variable does not need to be mutable
warning: variable does not need to be mutable
--> halo2/src/accumulator/verifier.rs:593:13
|
593 | let mut proof = Blake2bRead::init(&proof[..]);
| ----^^^^^
| |
| help: remove this `mut`