Skip to content
GitHub Actions / Clippy (beta) succeeded Dec 27, 2023 in 0s

Clippy (beta)

32 warnings

Details

Results

Message level Amount
Internal compiler error 0
Error 0
Warning 32
Note 0
Help 0

Versions

  • rustc 1.66.0 (69f9c33d7 2022-12-12)
  • cargo 1.66.0 (d65d197ad 2022-11-15)
  • clippy 0.1.66 (69f9c33 2022-12-12)

Annotations

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

See this annotation in the file changed.

@github-actions 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_proofs/src/plonk/prover.rs:371:29
    |
371 | ...                   &domain,
    |                       ^^^^^^^ help: change this to: `domain`
    |
    = 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`

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

See this annotation in the file changed.

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

replacing a value of type `T` with `T::default()` is better expressed using `std::mem::take`

warning: replacing a value of type `T` with `T::default()` is better expressed using `std::mem::take`
   --> halo2_proofs/src/plonk/prover.rs:350:22
    |
350 |         let advice = std::mem::replace(&mut self.advice, Vec::new());
    |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `std::mem::take(&mut self.advice)`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mem_replace_with_default

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

See this annotation in the file changed.

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

replacing a value of type `T` with `T::default()` is better expressed using `std::mem::take`

warning: replacing a value of type `T` with `T::default()` is better expressed using `std::mem::take`
   --> halo2_proofs/src/plonk/prover.rs:349:24
    |
349 |         let instance = std::mem::replace(&mut self.instance, Vec::new());
    |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `std::mem::take(&mut self.instance)`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mem_replace_with_default
    = note: `-W clippy::mem-replace-with-default` implied by `-W clippy::all`

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

See this annotation in the file changed.

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

this `if` has identical blocks

warning: this `if` has identical blocks
   --> halo2_proofs/src/plonk/prover.rs:249:55
    |
249 |               if column_indices.contains(&column_index) {
    |  _______________________________________________________^
250 | |                 // TODO: Check that column_index in witness is Some
251 | |                 // TODO: Check that the column length is `params.n()`
252 | |             } else {
    | |_____________^
    |
note: same as this
   --> halo2_proofs/src/plonk/prover.rs:252:20
    |
252 |               } else {
    |  ____________________^
253 | |                 // TODO: Check that column_index in witness is None
254 | |             };
    | |_____________^
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else
    = note: `-W clippy::if-same-then-else` implied by `-W clippy::all`

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

See this annotation in the file changed.

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

useless use of `format!`

warning: useless use of `format!`
   --> halo2_proofs/src/plonk/prover.rs:239:37
    |
239 |             return Err(Error::Other(format!("witness.len() != instance.len()")));
    |                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"witness.len() != instance.len()".to_string()`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format
    = note: `-W clippy::useless-format` implied by `-W clippy::all`

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

See this annotation in the file changed.

@github-actions 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_proofs/src/plonk/prover.rs:199:18
    |
199 |         witness: Vec<Vec<Option<Polynomial<Assigned<Scheme::Scalar>, LagrangeCoeff>>>>,
    |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = 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`

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

See this annotation in the file changed.

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

fields `num_fixed_columns` and `general_column_annotations` are never read

warning: fields `num_fixed_columns` and `general_column_annotations` are never read
    --> halo2_proofs/src/plonk/circuit.rs:1637:16
     |
1636 | pub struct ConstraintSystemV2Backend<F: Field> {
     |            ------------------------- fields in this struct
1637 |     pub(crate) num_fixed_columns: usize,
     |                ^^^^^^^^^^^^^^^^^
...
1672 |     pub(crate) general_column_annotations: HashMap<metadata::Column, String>,
     |                ^^^^^^^^^^^^^^^^^^^^^^^^^^
     |
     = note: `ConstraintSystemV2Backend` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis
     = note: `#[warn(dead_code)]` on by default

Check warning on line 145 in halo2_proofs/tests/frontend_backend_split.rs

See this annotation in the file changed.

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

unused `std::result::Result` that must be used

warning: unused `std::result::Result` that must be used
   --> halo2_proofs/tests/frontend_backend_split.rs:145:13
    |
145 |             config.s_gate.enable(region, *offset);
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: this `Result` may be an `Err` variant, which should be handled
    = note: `#[warn(unused_must_use)]` on by default

Check warning on line 143 in halo2_proofs/tests/frontend_backend_split.rs

See this annotation in the file changed.

@github-actions 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_proofs/tests/frontend_backend_split.rs:143:13
    |
143 |          -> Result<(AssignedCell<F, F>, [AssignedCell<F, F>; 4]), 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`

Check warning on line 152 in halo2_proofs/tests/frontend_backend_split.rs

See this annotation in the file changed.

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

unused variable: `v`

warning: unused variable: `v`
   --> halo2_proofs/tests/frontend_backend_split.rs:152:44
    |
152 |             let [b, c, d] = [b, c, d].map(|v| Value::known(F::from(b)));
    |                                            ^ help: if this is intentional, prefix it with an underscore: `_v`
    |
    = note: `#[warn(unused_variables)]` on by default

Check warning on line 16 in halo2_proofs/tests/frontend_backend_split.rs

See this annotation in the file changed.

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

unused import: `halo2_proofs::poly::VerificationStrategy`

warning: unused import: `halo2_proofs::poly::VerificationStrategy`
  --> halo2_proofs/tests/frontend_backend_split.rs:16:5
   |
16 | use halo2_proofs::poly::VerificationStrategy;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Check warning on line 14 in halo2_proofs/tests/frontend_backend_split.rs

See this annotation in the file changed.

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

unused import: `Verifier`

warning: unused import: `Verifier`
  --> halo2_proofs/tests/frontend_backend_split.rs:14:78
   |
14 | use halo2_proofs::poly::commitment::{CommitmentScheme, ParamsProver, Prover, Verifier};
   |                                                                              ^^^^^^^^

Check warning on line 14 in halo2_proofs/tests/frontend_backend_split.rs

See this annotation in the file changed.

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

unused import: `Prover`

warning: unused import: `Prover`
  --> halo2_proofs/tests/frontend_backend_split.rs:14:70
   |
14 | use halo2_proofs::poly::commitment::{CommitmentScheme, ParamsProver, Prover, Verifier};
   |                                                                      ^^^^^^

Check warning on line 14 in halo2_proofs/tests/frontend_backend_split.rs

See this annotation in the file changed.

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

unused import: `ParamsProver`

warning: unused import: `ParamsProver`
  --> halo2_proofs/tests/frontend_backend_split.rs:14:56
   |
14 | use halo2_proofs::poly::commitment::{CommitmentScheme, ParamsProver, Prover, Verifier};
   |                                                        ^^^^^^^^^^^^

Check warning on line 18 in halo2_proofs/tests/frontend_backend_split.rs

See this annotation in the file changed.

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

unused import: `EncodedChallenge`

warning: unused import: `EncodedChallenge`
  --> halo2_proofs/tests/frontend_backend_split.rs:18:46
   |
18 |     Blake2bRead, Blake2bWrite, Challenge255, EncodedChallenge, TranscriptReadBuffer,
   |                                              ^^^^^^^^^^^^^^^^

Check warning on line 22 in halo2_proofs/tests/frontend_backend_split.rs

See this annotation in the file changed.

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

unused import: `std::marker::PhantomData`

warning: unused import: `std::marker::PhantomData`
  --> halo2_proofs/tests/frontend_backend_split.rs:22:5
   |
22 | use std::marker::PhantomData;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^

Check warning on line 21 in halo2_proofs/tests/frontend_backend_split.rs

See this annotation in the file changed.

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

unused imports: `OsRng`, `RngCore`

warning: unused imports: `OsRng`, `RngCore`
  --> halo2_proofs/tests/frontend_backend_split.rs:21:17
   |
21 | use rand_core::{OsRng, RngCore};
   |                 ^^^^^  ^^^^^^^

Check warning on line 18 in halo2_proofs/tests/frontend_backend_split.rs

See this annotation in the file changed.

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

unused imports: `Blake2bRead`, `Blake2bWrite`, `Challenge255`, `TranscriptReadBuffer`, `TranscriptWriterBuffer`

warning: unused imports: `Blake2bRead`, `Blake2bWrite`, `Challenge255`, `TranscriptReadBuffer`, `TranscriptWriterBuffer`
  --> halo2_proofs/tests/frontend_backend_split.rs:18:5
   |
18 |     Blake2bRead, Blake2bWrite, Challenge255, EncodedChallenge, TranscriptReadBuffer,
   |     ^^^^^^^^^^^  ^^^^^^^^^^^^  ^^^^^^^^^^^^                    ^^^^^^^^^^^^^^^^^^^^
19 |     TranscriptWriterBuffer,
   |     ^^^^^^^^^^^^^^^^^^^^^^

Check warning on line 14 in halo2_proofs/tests/frontend_backend_split.rs

See this annotation in the file changed.

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

unused import: `CommitmentScheme`

warning: unused import: `CommitmentScheme`
  --> halo2_proofs/tests/frontend_backend_split.rs:14:38
   |
14 | use halo2_proofs::poly::commitment::{CommitmentScheme, ParamsProver, Prover, Verifier};
   |                                      ^^^^^^^^^^^^^^^^

Check warning on line 10 in halo2_proofs/tests/frontend_backend_split.rs

See this annotation in the file changed.

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

unused imports: `Assigned`, `ProvingKey`, `TableColumn`, `VerifyingKey`, `create_proof as create_plonk_proof`, `keygen_pk`, `keygen_vk`, `verify_proof as verify_plonk_proof`

warning: unused imports: `Assigned`, `ProvingKey`, `TableColumn`, `VerifyingKey`, `create_proof as create_plonk_proof`, `keygen_pk`, `keygen_vk`, `verify_proof as verify_plonk_proof`
  --> halo2_proofs/tests/frontend_backend_split.rs:10:5
   |
10 |     create_proof as create_plonk_proof, keygen_pk, keygen_vk, verify_proof as verify_plonk_proof,
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  ^^^^^^^^^  ^^^^^^^^^  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
11 |     Advice, Assigned, Circuit, Column, ConstraintSystem, Error, Expression, Fixed, Instance,
   |             ^^^^^^^^
12 |     ProvingKey, Selector, TableColumn, VerifyingKey,
   |     ^^^^^^^^^^            ^^^^^^^^^^^  ^^^^^^^^^^^^

Check warning on line 7 in halo2_proofs/tests/frontend_backend_split.rs

See this annotation in the file changed.

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

unused import: `Cell`

warning: unused import: `Cell`
 --> halo2_proofs/tests/frontend_backend_split.rs:7:43
  |
7 | use halo2_proofs::circuit::{AssignedCell, Cell, Layouter, Region, SimpleFloorPlanner, Value};
  |                                           ^^^^

Check warning on line 5 in halo2_proofs/tests/frontend_backend_split.rs

See this annotation in the file changed.

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

unused imports: `FromUniformBytes`, `WithSmallOrderMulGroup`

warning: unused imports: `FromUniformBytes`, `WithSmallOrderMulGroup`
 --> halo2_proofs/tests/frontend_backend_split.rs:5:10
  |
5 | use ff::{FromUniformBytes, WithSmallOrderMulGroup};
  |          ^^^^^^^^^^^^^^^^  ^^^^^^^^^^^^^^^^^^^^^^

Check warning on line 4 in halo2_proofs/tests/frontend_backend_split.rs

See this annotation in the file changed.

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

unused import: `assert_matches::assert_matches`

warning: unused import: `assert_matches::assert_matches`
 --> halo2_proofs/tests/frontend_backend_split.rs:4:5
  |
4 | use assert_matches::assert_matches;
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: `#[warn(unused_imports)]` on by default

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

See this annotation in the file changed.

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

unused variable: `advice_column`

warning: unused variable: `advice_column`
   --> halo2_proofs/src/plonk/prover.rs:248:28
    |
248 |         for (column_index, advice_column) in witness.iter().enumerate() {
    |                            ^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_advice_column`
    |
    = note: `#[warn(unused_variables)]` on by default

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

See this annotation in the file changed.

@github-actions 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_proofs/src/plonk/prover.rs:371:29
    |
371 | ...                   &domain,
    |                       ^^^^^^^ help: change this to: `domain`
    |
    = 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`