checkpoint #182
Annotations
3 errors and 35 warnings
not all trait items implemented, missing: `Params`:
halo2_middleware/tests/circuit_linker.rs#L181
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 */;`
|
not all trait items implemented, missing: `Params`:
halo2_middleware/tests/circuit_linker.rs#L55
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 */;`
|
coverage
Process completed with exit code 1.
|
this expression creates a reference which is immediately dereferenced by the compiler:
halo2_middleware/src/circuit_linker.rs#L480
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
|
this expression creates a reference which is immediately dereferenced by the compiler:
halo2_middleware/src/circuit_linker.rs#L376
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
|
this expression creates a reference which is immediately dereferenced by the compiler:
halo2_middleware/src/circuit_linker.rs#L372
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
|
usage of `contains_key` followed by `insert` on a `HashMap`:
halo2_middleware/src/circuit_linker.rs#L228
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 + }
|
|
usage of `contains_key` followed by `insert` on a `HashMap`:
halo2_middleware/src/circuit_linker.rs#L216
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 + }
|
|
usage of `contains_key` followed by `insert` on a `HashMap`:
halo2_middleware/src/circuit_linker.rs#L204
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 + }
|
|
usage of `contains_key` followed by `insert` on a `HashMap`:
halo2_middleware/src/circuit_linker.rs#L188
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 + }
|
|
using `clone` on type `F` which implements the `Copy` trait:
halo2_middleware/src/circuit_linker.rs#L72
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)]`
|
this expression creates a reference which is immediately dereferenced by the compiler:
halo2_middleware/src/circuit_linker.rs#L60
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)]`
|
unused imports: `AssignedCell`, `Challenge`, `FirstPhase`, `Instance`, `Region`, `SecondPhase`, `Selector`, `dev::MockProver`:
halo2_middleware/tests/circuit_linker.rs#L13
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,
| ^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^
|
unused import: `verify_proof`:
halo2_middleware/tests/circuit_linker.rs#L5
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
|
the following explicit lifetimes could be elided: 'a:
halo2_debug/src/display.rs#L199
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, ()> {
|
|
the following explicit lifetimes could be elided: 'a:
halo2_debug/src/display.rs#L146
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, ()> {
|
|
this expression creates a reference which is immediately dereferenced by the compiler:
halo2_debug/src/display.rs#L124
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
|
this expression creates a reference which is immediately dereferenced by the compiler:
halo2_debug/src/display.rs#L124
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
|
this expression creates a reference which is immediately dereferenced by the compiler:
halo2_debug/src/display.rs#L122
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
|
this expression creates a reference which is immediately dereferenced by the compiler:
halo2_debug/src/display.rs#L122
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
|
this expression creates a reference which is immediately dereferenced by the compiler:
halo2_debug/src/display.rs#L118
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
|
this expression creates a reference which is immediately dereferenced by the compiler:
halo2_debug/src/display.rs#L115
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
|
this expression creates a reference which is immediately dereferenced by the compiler:
halo2_debug/src/display.rs#L115
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
|
this expression creates a reference which is immediately dereferenced by the compiler:
halo2_debug/src/display.rs#L112
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
|
this expression creates a reference which is immediately dereferenced by the compiler:
halo2_debug/src/display.rs#L109
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
|
this expression creates a reference which is immediately dereferenced by the compiler:
halo2_debug/src/display.rs#L109
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)]`
|
the following explicit lifetimes could be elided: 'a:
halo2_debug/src/display.rs#L74
warning: the following explicit lifetimes could be elided: 'a
--> halo2_debug/src/display.rs:74:18
|
74 | pub fn expr_disp<'a, F: PrimeField, V: Variable>(
| ^^
75 | e: &'a Expression<F, V>,
| ^^
76 | ) -> ExprDisp<'a, F, V, ()> {
| ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
= note: `-W clippy::needless-lifetimes` implied by `-W clippy::all`
= help: to override `-W clippy::all` add `#[allow(clippy::needless_lifetimes)]`
help: elide the lifetimes
|
74 ~ pub fn expr_disp<F: PrimeField, V: Variable>(
75 ~ e: &Expression<F, V>,
76 ~ ) -> ExprDisp<'_, F, V, ()> {
|
|
this call to `as_ref` does nothing:
halo2_debug/src/display.rs#L30
warning: this call to `as_ref` does nothing
--> halo2_debug/src/display.rs:30:48
|
30 | let v_neg = BigUint::from_bytes_le(v_neg.as_ref());
| ^^^^^^^^^^^^^^ help: try: `v_neg`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_asref
|
this call to `as_ref` does nothing:
halo2_debug/src/display.rs#L21
warning: this call to `as_ref` does nothing
--> halo2_debug/src/display.rs:21:40
|
21 | let v = BigUint::from_bytes_le(v.as_ref());
| ^^^^^^^^^^ help: try: `v`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_asref
= note: `-W clippy::useless-asref` implied by `-W clippy::all`
= help: to override `-W clippy::all` add `#[allow(clippy::useless_asref)]`
|
this expression creates a reference which is immediately dereferenced by the compiler:
halo2_middleware/src/circuit_linker.rs#L480
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
|
this expression creates a reference which is immediately dereferenced by the compiler:
halo2_middleware/src/circuit_linker.rs#L376
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
|
this expression creates a reference which is immediately dereferenced by the compiler:
halo2_middleware/src/circuit_linker.rs#L372
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
|
usage of `contains_key` followed by `insert` on a `HashMap`:
halo2_middleware/src/circuit_linker.rs#L228
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 + }
|
|
usage of `contains_key` followed by `insert` on a `HashMap`:
halo2_middleware/src/circuit_linker.rs#L216
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 + }
|
|
usage of `contains_key` followed by `insert` on a `HashMap`:
halo2_middleware/src/circuit_linker.rs#L204
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 + }
|
|
usage of `contains_key` followed by `insert` on a `HashMap`:
halo2_middleware/src/circuit_linker.rs#L188
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 + }
|
|
using `clone` on type `F` which implements the `Copy` trait:
halo2_middleware/src/circuit_linker.rs#L72
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)]`
|
this expression creates a reference which is immediately dereferenced by the compiler:
halo2_middleware/src/circuit_linker.rs#L60
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)]`
|