fix some simple building errs #336
Clippy (beta)
29 errors, 50 warnings
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 29 |
Warning | 50 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.73.0-nightly (a6f8aa5a0 2023-08-11)
- cargo 1.73.0-nightly (d78bbf4bd 2023-08-03)
- clippy 0.1.73 (a6f8aa5 2023-08-11)
Annotations
Check warning on line 12 in halo2_proofs/src/poly/domain.rs
github-actions / Clippy (beta)
unused import: `PrimeField`
warning: unused import: `PrimeField`
--> halo2_proofs/src/poly/domain.rs:12:30
|
12 | ff::{BatchInvert, Field, PrimeField},
| ^^^^^^^^^^
Check warning on line 9 in halo2_proofs/src/poly/commitment.rs
github-actions / Clippy (beta)
unused import: `Group`
warning: unused import: `Group`
--> halo2_proofs/src/poly/commitment.rs:9:20
|
9 | use group::{Curve, Group};
| ^^^^^
Check warning on line 18 in halo2_proofs/src/plonk/mv_lookup/prover.rs
github-actions / Clippy (beta)
unused import: `BitViewSized`
warning: unused import: `BitViewSized`
--> halo2_proofs/src/plonk/mv_lookup/prover.rs:18:10
|
18 | use ff::{BitViewSized, PrimeField, PrimeFieldBits, WithSmallOrderMulGroup};
| ^^^^^^^^^^^^
Check warning on line 12 in halo2_proofs/src/plonk/evaluation.rs
github-actions / Clippy (beta)
unused import: `rayon::prelude::ParallelIterator`
warning: unused import: `rayon::prelude::ParallelIterator`
--> halo2_proofs/src/plonk/evaluation.rs:12:5
|
12 | use rayon::prelude::ParallelIterator;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Check warning on line 15 in halo2_proofs/src/plonk/circuit.rs
github-actions / Clippy (beta)
unused import: `std::hash::Hasher`
warning: unused import: `std::hash::Hasher`
--> halo2_proofs/src/plonk/circuit.rs:15:5
|
15 | use std::hash::Hasher;
| ^^^^^^^^^^^^^^^^^
Check failure on line 2086 in halo2_proofs/src/dev.rs
github-actions / Clippy (beta)
mismatched types
error[E0308]: mismatched types
--> halo2_proofs/src/dev.rs:2086:51
|
2086 | ... name: lookup.name.clone(),
| ^^^^^^^^^^^^-----^^
| | |
| | help: try using a conversion method: `to_string`
| expected `String`, found `&str`
Check failure on line 1618 in halo2_proofs/src/dev.rs
github-actions / Clippy (beta)
mismatched types
error[E0308]: mismatched types
--> halo2_proofs/src/dev.rs:1618:51
|
1618 | ... name: lookup.name.clone(),
| ^^^^^^^^^^^^-----^^
| | |
| | help: try using a conversion method: `to_string`
| expected `String`, found `&str`
Check failure on line 1303 in halo2_proofs/src/dev.rs
github-actions / Clippy (beta)
no method named `build_ordered_mapping` found for enum `std::option::Option` in the current scope
error[E0599]: no method named `build_ordered_mapping` found for enum `std::option::Option` in the current scope
--> halo2_proofs/src/dev.rs:1303:28
|
1303 | prover.permutation.build_ordered_mapping();
| ^^^^^^^^^^^^^^^^^^^^^ method not found in `Option<Assembly>`
|
note: the method `build_ordered_mapping` exists on the type `plonk::permutation::keygen::Assembly`
--> halo2_proofs/src/plonk/permutation/keygen.rs:260:5
|
260 | pub fn build_ordered_mapping(&mut self) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: consider using `Option::expect` to unwrap the `plonk::permutation::keygen::Assembly` value, panicking if the value is an `Option::None`
|
1303 | prover.permutation.expect("REASON").build_ordered_mapping();
| +++++++++++++++++
Check failure on line 329 in halo2_proofs/src/dev/graph/layout.rs
github-actions / Clippy (beta)
failed to resolve: use of undeclared type `F`
error[E0433]: failed to resolve: use of undeclared type `F`
--> halo2_proofs/src/dev/graph/layout.rs:329:8
|
329 | Ok(F::ZERO)
| ^
| |
| use of undeclared type `F`
| help: a trait with a similar name exists: `Fn`
Check failure on line 325 in halo2_proofs/src/dev/graph/layout.rs
github-actions / Clippy (beta)
failed to resolve: use of undeclared type `F`
error[E0433]: failed to resolve: use of undeclared type `F`
--> halo2_proofs/src/dev/graph/layout.rs:325:8
|
325 | Ok(F::ZERO)
| ^
| |
| use of undeclared type `F`
| help: a trait with a similar name exists: `Fn`
Check failure on line 72 in halo2_proofs/src/poly/ipa/multiopen/verifier.rs
github-actions / Clippy (beta)
no method named `append_term` found for tuple `(poly::ipa::msm::MSMIPA<'_, C>, <C as halo2curves::CurveAffine>::ScalarExt)` in the current scope
error[E0599]: no method named `append_term` found for tuple `(poly::ipa::msm::MSMIPA<'_, C>, <C as halo2curves::CurveAffine>::ScalarExt)` in the current scope
--> halo2_proofs/src/poly/ipa/multiopen/verifier.rs:72:48
|
72 | q_commitments[set_idx].append_term(C::Scalar::ONE, (*c).into());
| ^^^^^^^^^^^ method not found in `(MSMIPA<'_, C>, <C as CurveAffine>::ScalarExt)`
|
= help: items from traits can only be used if the trait is implemented and in scope
note: `poly::commitment::MSM` defines an item `append_term`, perhaps you need to implement it
--> halo2_proofs/src/poly/commitment.rs:102:1
|
102 | pub trait MSM<C: CurveAffine>: Clone + Debug + Send + Sync {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Check failure on line 308 in halo2_proofs/src/plonk/evaluation.rs
github-actions / Clippy (beta)
no variant or associated item named `Gamma` found for enum `plonk::evaluation::ValueSource` in the current scope
error[E0599]: no variant or associated item named `Gamma` found for enum `plonk::evaluation::ValueSource` in the current scope
--> halo2_proofs/src/plonk/evaluation.rs:308:30
|
25 | pub enum ValueSource {
| -------------------- variant or associated item `Gamma` not found for this enum
...
308 | ValueSource::Gamma(),
| ^^^^^ variant or associated item not found in `ValueSource`
Check failure on line 300 in halo2_proofs/src/plonk/evaluation.rs
github-actions / Clippy (beta)
no variant or associated item named `Gamma` found for enum `plonk::evaluation::ValueSource` in the current scope
error[E0599]: no variant or associated item named `Gamma` found for enum `plonk::evaluation::ValueSource` in the current scope
--> halo2_proofs/src/plonk/evaluation.rs:300:30
|
25 | pub enum ValueSource {
| -------------------- variant or associated item `Gamma` not found for this enum
...
300 | ValueSource::Gamma(),
| ^^^^^ variant or associated item not found in `ValueSource`
Check failure on line 1914 in halo2_proofs/src/plonk/circuit.rs
github-actions / Clippy (beta)
mismatched types
error[E0308]: mismatched types
--> halo2_proofs/src/plonk/circuit.rs:1914:10
|
1910 | pub fn shuffle<S: AsRef<str>>(
| ------- implicitly returns `()` as its body has no tail or `return` expression
...
1914 | ) -> usize {
| ^^^^^ expected `usize`, found `()`
|
help: consider returning the local binding `index`
|
1935 ~ });
1936 + index
|
Check failure on line 1906 in halo2_proofs/src/plonk/circuit.rs
github-actions / Clippy (beta)
this function takes 3 arguments but 2 arguments were supplied
error[E0061]: this function takes 3 arguments but 2 arguments were supplied
--> halo2_proofs/src/plonk/circuit.rs:1906:19
|
1906 | .push(mv_lookup::Argument::new(name.as_ref(), table_map));
| ^^^^^^^^^^^^^^^^^^^^^^^^-------------------------- an argument of type `&[std::vec::Vec<plonk::circuit::Expression<F>>]` is missing
|
note: associated function defined here
--> halo2_proofs/src/plonk/mv_lookup.rs:37:12
|
37 | pub fn new(name: &'static str, table: &[Expression<F>], input: &[Vec<Expression<F>>]) -> Self {
| ^^^ ------------------ ----------------------- ----------------------------
help: provide the argument
|
1906 | .push(mv_lookup::Argument::new(name.as_ref(), table_map, /* &[std::vec::Vec<plonk::circuit::Expression<F>>] */));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Check failure on line 1904 in halo2_proofs/src/plonk/circuit.rs
github-actions / Clippy (beta)
a value of type `&[plonk::circuit::Expression<F>]` cannot be built from an iterator over elements of type `(plonk::circuit::Expression<F>, plonk::circuit::Expression<F>)`
error[E0277]: a value of type `&[plonk::circuit::Expression<F>]` cannot be built from an iterator over elements of type `(plonk::circuit::Expression<F>, plonk::circuit::Expression<F>)`
--> halo2_proofs/src/plonk/circuit.rs:1904:14
|
1904 | .collect();
| ^^^^^^^ value of type `&[plonk::circuit::Expression<F>]` cannot be built from `std::iter::Iterator<Item=(plonk::circuit::Expression<F>, plonk::circuit::Expression<F>)>`
|
= help: the trait `std::iter::FromIterator<(plonk::circuit::Expression<F>, plonk::circuit::Expression<F>)>` is not implemented for `&[plonk::circuit::Expression<F>]`
note: the method call chain might not have had the expected associated types
--> halo2_proofs/src/plonk/circuit.rs:1898:14
|
1897 | let table_map = table_map(&mut cells)
| --------------------- this expression has type `Vec<(Expression<F>, Expression<F>)>`
1898 | .into_iter()
| ^^^^^^^^^^^ `Iterator::Item` is `(Expression<F>, Expression<F>)` here
1899 | .map(|(mut input, mut table)| {
| ______________-
1900 | | input.query_cells(&mut cells);
1901 | | table.query_cells(&mut cells);
1902 | | (input, table)
1903 | | })
| |______________- `Iterator::Item` remains `(Expression<F>, Expression<F>)` here
note: required by a bound in `std::iter::Iterator::collect`
--> /rustc/a6f8aa5a092c5e46fcbdafe4c80b4e55ba0de41c/library/core/src/iter/traits/iterator.rs:1891:5
Check failure on line 387 in halo2_proofs/src/dev/tfp.rs
github-actions / Clippy (beta)
not all trait items implemented, missing: `query_advice`, `query_fixed`
error[E0046]: not all trait items implemented, missing: `query_advice`, `query_fixed`
--> halo2_proofs/src/dev/tfp.rs:387:1
|
387 | impl<'cs, F: Field, CS: Assignment<F>> Assignment<F> for TracingAssignment<'cs, F, CS> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `query_advice`, `query_fixed` in implementation
|
::: halo2_proofs/src/plonk/circuit.rs:688:5
|
688 | fn query_advice(&self, column: Column<Advice>, row: usize) -> Result<F, Error>;
| ------------------------------------------------------------------------------- `query_advice` from trait
...
691 | fn query_fixed(&self, column: Column<Fixed>, row: usize) -> Result<F, Error>;
| ----------------------------------------------------------------------------- `query_fixed` from trait
Check failure on line 253 in halo2_proofs/src/dev/tfp.rs
github-actions / Clippy (beta)
not all trait items implemented, missing: `query_advice`, `query_fixed`, `global_offset`
error[E0046]: not all trait items implemented, missing: `query_advice`, `query_fixed`, `global_offset`
--> halo2_proofs/src/dev/tfp.rs:253:1
|
253 | impl<'r, F: Field> RegionLayouter<F> for TracingRegion<'r, F> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `query_advice`, `query_fixed`, `global_offset` in implementation
|
::: halo2_proofs/src/circuit/layouter.rs:77:5
|
77 | fn query_advice(&self, column: Column<Advice>, offset: usize) -> Result<F, Error>;
| ---------------------------------------------------------------------------------- `query_advice` from trait
...
80 | fn query_fixed(&self, column: Column<Fixed>, offset: usize) -> Result<F, Error>;
| -------------------------------------------------------------------------------- `query_fixed` from trait
...
143 | fn global_offset(&self, row_offset: usize) -> usize;
| ---------------------------------------------------- `global_offset` from trait
Check failure on line 114 in halo2_proofs/src/plonk/mv_lookup/verifier.rs
github-actions / Clippy (beta)
the type `[<C as halo2curves::CurveAffine>::ScalarExt]` cannot be indexed by `std::option::Option<usize>`
error[E0277]: the type `[<C as halo2curves::CurveAffine>::ScalarExt]` cannot be indexed by `std::option::Option<usize>`
--> halo2_proofs/src/plonk/mv_lookup/verifier.rs:114:53
|
114 | ... &|query| instance_evals[query.index],
| ^^^^^^^^^^^ slice indices are of type `usize` or ranges of `usize`
|
= help: the trait `std::slice::SliceIndex<[<C as halo2curves::CurveAffine>::ScalarExt]>` is not implemented for `std::option::Option<usize>`
= note: required for `[<C as halo2curves::CurveAffine>::ScalarExt]` to implement `std::ops::Index<std::option::Option<usize>>`
Check failure on line 113 in halo2_proofs/src/plonk/mv_lookup/verifier.rs
github-actions / Clippy (beta)
the type `[<C as halo2curves::CurveAffine>::ScalarExt]` cannot be indexed by `std::option::Option<usize>`
error[E0277]: the type `[<C as halo2curves::CurveAffine>::ScalarExt]` cannot be indexed by `std::option::Option<usize>`
--> halo2_proofs/src/plonk/mv_lookup/verifier.rs:113:51
|
113 | ... &|query| advice_evals[query.index],
| ^^^^^^^^^^^ slice indices are of type `usize` or ranges of `usize`
|
= help: the trait `std::slice::SliceIndex<[<C as halo2curves::CurveAffine>::ScalarExt]>` is not implemented for `std::option::Option<usize>`
= note: required for `[<C as halo2curves::CurveAffine>::ScalarExt]` to implement `std::ops::Index<std::option::Option<usize>>`
Check failure on line 112 in halo2_proofs/src/plonk/mv_lookup/verifier.rs
github-actions / Clippy (beta)
the type `[<C as halo2curves::CurveAffine>::ScalarExt]` cannot be indexed by `std::option::Option<usize>`
error[E0277]: the type `[<C as halo2curves::CurveAffine>::ScalarExt]` cannot be indexed by `std::option::Option<usize>`
--> halo2_proofs/src/plonk/mv_lookup/verifier.rs:112:50
|
112 | ... &|query| fixed_evals[query.index],
| ^^^^^^^^^^^ slice indices are of type `usize` or ranges of `usize`
|
= help: the trait `std::slice::SliceIndex<[<C as halo2curves::CurveAffine>::ScalarExt]>` is not implemented for `std::option::Option<usize>`
= note: required for `[<C as halo2curves::CurveAffine>::ScalarExt]` to implement `std::ops::Index<std::option::Option<usize>>`
Check warning on line 3 in halo2_proofs/src/helpers.rs
github-actions / Clippy (beta)
unused import: `ff::Field`
warning: unused import: `ff::Field`
--> halo2_proofs/src/helpers.rs:3:5
|
3 | use ff::Field;
| ^^^^^^^^^
Check warning on line 29 in halo2_proofs/src/dev.rs
github-actions / Clippy (beta)
unused import: `group::Group`
warning: unused import: `group::Group`
--> halo2_proofs/src/dev.rs:29:5
|
29 | use group::Group;
| ^^^^^^^^^^^^
Check warning on line 13 in halo2_proofs/src/dev.rs
github-actions / Clippy (beta)
unused import: `group::Group`
warning: unused import: `group::Group`
--> halo2_proofs/src/dev.rs:13:5
|
13 | use group::Group;
| ^^^^^^^^^^^^
Check warning on line 8 in halo2_proofs/src/dev.rs
github-actions / Clippy (beta)
unused import: `std::time::Instant`
warning: unused import: `std::time::Instant`
--> halo2_proofs/src/dev.rs:8:5
|
8 | use std::time::Instant;
| ^^^^^^^^^^^^^^^^^^