Clippy (beta)
2 errors, 35 warnings
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 2 |
Warning | 35 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.78.0 (9b00956e5 2024-04-29)
- cargo 1.78.0 (54d8815d0 2024-03-26)
- clippy 0.1.78 (9b00956 2024-04-29)
Annotations
Check warning on line 480 in halo2_middleware/src/circuit_linker.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_middleware/src/circuit_linker.rs:480:25
|
480 | &mut witness[*global_index].as_mut().unwrap(),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `witness[*global_index].as_mut().unwrap()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
Check warning on line 376 in halo2_middleware/src/circuit_linker.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_middleware/src/circuit_linker.rs:376:57
|
376 | column: column_to_global(circuit_index, &map, &cell_rhs.column),
| ^^^^ help: change this to: `map`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
Check warning on line 372 in halo2_middleware/src/circuit_linker.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_middleware/src/circuit_linker.rs:372:57
|
372 | column: column_to_global(circuit_index, &map, &cell_lhs.column),
| ^^^^ help: change this to: `map`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
Check warning on line 242 in halo2_middleware/src/circuit_linker.rs
github-actions / Clippy (beta)
usage of `contains_key` followed by `insert` on a `HashMap`
warning: usage of `contains_key` followed by `insert` on a `HashMap`
--> halo2_middleware/src/circuit_linker.rs:228:13
|
228 | / if !map
229 | | .challenge
230 | | .contains_key(&(circuit_index, local_challenge_index))
231 | | {
... |
241 | | challenge_phase.push(phase);
242 | | }
| |_____________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_entry
help: try
|
228 ~ if let std::collections::hash_map::Entry::Vacant(e) = map
229 + .challenge.entry((circuit_index, local_challenge_index)) {
230 + let phase = cs.challenge_phase[local_challenge_index];
231 + e.insert(ChallengeMid {
232 + index: num_challenges,
233 + phase,
234 + });
235 + num_challenges += 1;
236 + challenge_phase.push(phase);
237 + }
|
Check warning on line 223 in halo2_middleware/src/circuit_linker.rs
github-actions / Clippy (beta)
usage of `contains_key` followed by `insert` on a `HashMap`
warning: usage of `contains_key` followed by `insert` on a `HashMap`
--> halo2_middleware/src/circuit_linker.rs:216:13
|
216 | / if !map
217 | | .instance_column
218 | | .contains_key(&(circuit_index, local_column_index))
219 | | {
... |
222 | | num_instance_columns += 1;
223 | | }
| |_____________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_entry
help: try
|
216 ~ if let std::collections::hash_map::Entry::Vacant(e) = map
217 + .instance_column.entry((circuit_index, local_column_index)) {
218 + e.insert(num_instance_columns);
219 + num_instance_columns += 1;
220 + }
|
Check warning on line 211 in halo2_middleware/src/circuit_linker.rs
github-actions / Clippy (beta)
usage of `contains_key` followed by `insert` on a `HashMap`
warning: usage of `contains_key` followed by `insert` on a `HashMap`
--> halo2_middleware/src/circuit_linker.rs:204:13
|
204 | / if !map
205 | | .fixed_column
206 | | .contains_key(&(circuit_index, local_column_index))
207 | | {
... |
210 | | num_fixed_columns += 1;
211 | | }
| |_____________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_entry
help: try
|
204 ~ if let std::collections::hash_map::Entry::Vacant(e) = map
205 + .fixed_column.entry((circuit_index, local_column_index)) {
206 + e.insert(num_fixed_columns);
207 + num_fixed_columns += 1;
208 + }
|
Check warning on line 199 in halo2_middleware/src/circuit_linker.rs
github-actions / Clippy (beta)
usage of `contains_key` followed by `insert` on a `HashMap`
warning: usage of `contains_key` followed by `insert` on a `HashMap`
--> halo2_middleware/src/circuit_linker.rs:188:13
|
188 | / if !map
189 | | .advice_column
190 | | .contains_key(&(circuit_index, local_column_index))
191 | | {
... |
198 | | num_advice_columns += 1;
199 | | }
| |_____________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_entry
= note: `-W clippy::map-entry` implied by `-W clippy::all`
= help: to override `-W clippy::all` add `#[allow(clippy::map_entry)]`
help: try
|
188 ~ if let std::collections::hash_map::Entry::Vacant(e) = map
189 + .advice_column.entry((circuit_index, local_column_index)) {
190 + e.insert(num_advice_columns);
191 + advice_column_phase.push(cs.advice_column_phase[local_column_index]);
192 + if cs.unblinded_advice_columns.contains(&local_column_index) {
193 + unblinded_advice_columns.push(num_advice_columns);
194 + }
195 + num_advice_columns += 1;
196 + }
|
Check warning on line 72 in halo2_middleware/src/circuit_linker.rs
github-actions / Clippy (beta)
using `clone` on type `F` which implements the `Copy` trait
warning: using `clone` on type `F` which implements the `Copy` trait
--> halo2_middleware/src/circuit_linker.rs:72:33
|
72 | Constant(f) => Constant(f.clone()),
| ^^^^^^^^^ help: try dereferencing it: `*f`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
= note: `-W clippy::clone-on-copy` implied by `-W clippy::all`
= help: to override `-W clippy::all` add `#[allow(clippy::clone_on_copy)]`
Check warning on line 60 in halo2_middleware/src/circuit_linker.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_middleware/src/circuit_linker.rs:60:54
|
60 | index: column_to_global_index(circuit_index, &map, column.column_type, column.index),
| ^^^^ help: change this to: `map`
|
= 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 failure on line 181 in halo2_middleware/tests/circuit_linker.rs
github-actions / Clippy (beta)
not all trait items implemented, missing: `Params`
error[E0046]: not all trait items implemented, missing: `Params`
--> halo2_middleware/tests/circuit_linker.rs:181:1
|
181 | impl<F: Field + From<u64>> Circuit<F> for CircuitB<F> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `Params` in implementation
|
= help: implement the missing item: `type Params = /* Type */;`
Check failure on line 55 in halo2_middleware/tests/circuit_linker.rs
github-actions / Clippy (beta)
not all trait items implemented, missing: `Params`
error[E0046]: not all trait items implemented, missing: `Params`
--> halo2_middleware/tests/circuit_linker.rs:55:1
|
55 | impl<F: Field + From<u64>> Circuit<F> for CircuitA<F> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `Params` in implementation
|
= help: implement the missing item: `type Params = /* Type */;`
Check warning on line 13 in halo2_middleware/tests/circuit_linker.rs
github-actions / Clippy (beta)
unused imports: `AssignedCell`, `Challenge`, `FirstPhase`, `Instance`, `Region`, `SecondPhase`, `Selector`, `dev::MockProver`
warning: unused imports: `AssignedCell`, `Challenge`, `FirstPhase`, `Instance`, `Region`, `SecondPhase`, `Selector`, `dev::MockProver`
--> halo2_middleware/tests/circuit_linker.rs:13:26
|
13 | compile_circuit, AssignedCell, Layouter, Region, SimpleFloorPlanner, Value,
| ^^^^^^^^^^^^ ^^^^^^
...
16 | dev::MockProver,
| ^^^^^^^^^^^^^^^
17 | plonk::{
18 | circuit::{Challenge, Column},
| ^^^^^^^^^
19 | Advice, Circuit, ConstraintSystem, Error as ErrorFront, Expression, FirstPhase, Fixed,
| ^^^^^^^^^^
20 | Instance, SecondPhase, Selector,
| ^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^
Check warning on line 5 in halo2_middleware/tests/circuit_linker.rs
github-actions / Clippy (beta)
unused import: `verify_proof`
warning: unused import: `verify_proof`
--> halo2_middleware/tests/circuit_linker.rs:5:20
|
5 | verifier::{verify_proof, verify_proof_single},
| ^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
Check warning on line 199 in halo2_debug/src/display.rs
github-actions / Clippy (beta)
the following explicit lifetimes could be elided: 'a
warning: the following explicit lifetimes could be elided: 'a
--> halo2_debug/src/display.rs:199:25
|
199 | pub fn shuffle_arg_disp<'a, F: PrimeField, V: Variable>(
| ^^
200 | a: &'a shuffle::Argument<F, V>,
| ^^
201 | ) -> ShuffleArgDisp<'a, F, V, ()> {
| ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
199 ~ pub fn shuffle_arg_disp<F: PrimeField, V: Variable>(
200 ~ a: &shuffle::Argument<F, V>,
201 ~ ) -> ShuffleArgDisp<'_, F, V, ()> {
|
Check warning on line 146 in halo2_debug/src/display.rs
github-actions / Clippy (beta)
the following explicit lifetimes could be elided: 'a
warning: the following explicit lifetimes could be elided: 'a
--> halo2_debug/src/display.rs:146:24
|
146 | pub fn lookup_arg_disp<'a, F: PrimeField, V: Variable>(
| ^^
147 | a: &'a lookup::Argument<F, V>,
| ^^
148 | ) -> LookupArgDisp<'a, F, V, ()> {
| ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
146 ~ pub fn lookup_arg_disp<F: PrimeField, V: Variable>(
147 ~ a: &lookup::Argument<F, V>,
148 ~ ) -> LookupArgDisp<'_, F, V, ()> {
|
Check warning on line 124 in halo2_debug/src/display.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_debug/src/display.rs:124:40
|
124 | fmt_expr(&b, f, is_sum(&b))
| ^^ help: change this to: `b`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
Check warning on line 124 in halo2_debug/src/display.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_debug/src/display.rs:124:26
|
124 | fmt_expr(&b, f, is_sum(&b))
| ^^ help: change this to: `b`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
Check warning on line 122 in halo2_debug/src/display.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_debug/src/display.rs:122:40
|
122 | fmt_expr(&a, f, is_sum(&a))?;
| ^^ help: change this to: `a`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
Check warning on line 122 in halo2_debug/src/display.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_debug/src/display.rs:122:26
|
122 | fmt_expr(&a, f, is_sum(&a))?;
| ^^ help: change this to: `a`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
Check warning on line 118 in halo2_debug/src/display.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_debug/src/display.rs:118:30
|
118 | fmt_expr(&b, f, false)
| ^^ help: change this to: `b`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
Check warning on line 115 in halo2_debug/src/display.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_debug/src/display.rs:115:46
|
115 | fmt_expr(&neg, f, is_sum(&neg))
| ^^^^ help: change this to: `neg`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
Check warning on line 115 in halo2_debug/src/display.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_debug/src/display.rs:115:30
|
115 | fmt_expr(&neg, f, is_sum(&neg))
| ^^^^ help: change this to: `neg`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
Check warning on line 112 in halo2_debug/src/display.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_debug/src/display.rs:112:26
|
112 | fmt_expr(&a, f, false)?;
| ^^ help: change this to: `a`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
Check warning on line 109 in halo2_debug/src/display.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_debug/src/display.rs:109:40
|
109 | fmt_expr(&a, f, is_sum(&a))
| ^^ help: change this to: `a`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
Check warning on line 109 in halo2_debug/src/display.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_debug/src/display.rs:109:26
|
109 | fmt_expr(&a, f, is_sum(&a))
| ^^ help: change this to: `a`
|
= 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)]`