Dump lookup constraints on fibonacci circuit #8
Clippy (beta)
1 error, 76 warnings
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 1 |
Warning | 76 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.83.0-beta.2 (88c1c3c11 2024-10-18)
- cargo 1.83.0-beta.2 (15fbd2f60 2024-10-08)
- clippy 0.1.83 (88c1c3c 2024-10-18)
Annotations
Check warning on line 127 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:127:34
|
127 | _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 118 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:118:34
|
118 | _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 103 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:103:34
|
103 | _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 284 in halo2_gadgets/src/sha256/table16/compression/compression_gates.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/sha256/table16/compression/compression_gates.rs:280:10
|
280 | ) -> Constraints<
| __________^
281 | | F,
282 | | (&'static str, Expression<F>),
283 | | impl Iterator<Item = (&'static str, Expression<F>)>,
284 | | > {
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity
Check warning on line 109 in halo2_gadgets/src/sha256/table16/compression/compression_gates.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/sha256/table16/compression/compression_gates.rs:105:10
|
105 | ) -> Constraints<
| __________^
106 | | F,
107 | | (&'static str, Expression<F>),
108 | | impl Iterator<Item = (&'static str, Expression<F>)>,
109 | | > {
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity
Check warning on line 41 in halo2_gadgets/src/sha256/table16/compression/compression_gates.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/sha256/table16/compression/compression_gates.rs:37:10
|
37 | ) -> Constraints<
| __________^
38 | | F,
39 | | (&'static str, Expression<F>),
40 | | impl Iterator<Item = (&'static str, Expression<F>)>,
41 | | > {
| |_____^
|
= 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 206 in halo2_gadgets/src/poseidon.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/poseidon.rs:206:33
|
206 | _marker: 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 159 in halo2_gadgets/src/poseidon.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/poseidon.rs:159:33
|
159 | _marker: 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 363 in halo2_gadgets/src/poseidon/primitives.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/poseidon/primitives.rs:363:33
|
363 | _domain: 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 257 in halo2_gadgets/src/poseidon/primitives.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/poseidon/primitives.rs:257:33
|
257 | _marker: 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 220 in halo2_gadgets/src/poseidon/primitives.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/poseidon/primitives.rs:220:33
|
220 | _marker: 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 72 in halo2_gadgets/src/poseidon/primitives/grain.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/poseidon/primitives/grain.rs:72:32
|
72 | _field: 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
= note: `-W clippy::default-constructed-unit-structs` implied by `-W clippy::all`
= help: to override `-W clippy::all` add `#[allow(clippy::default_constructed_unit_structs)]`
Check warning on line 517 in halo2_gadgets/src/poseidon/pow5.rs
github-actions / Clippy (beta)
the borrowed expression implements the required traits
warning: the borrowed expression implements the required traits
--> halo2_gadgets/src/poseidon/pow5.rs:517:77
|
517 | let r_0 = (p[0] + config.round_constants[round + 1][0]).pow(&config.alpha);
| ^^^^^^^^^^^^^ help: change this to: `config.alpha`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
Check warning on line 477 in halo2_gadgets/src/poseidon/pow5.rs
github-actions / Clippy (beta)
the borrowed expression implements the required traits
warning: the borrowed expression implements the required traits
--> halo2_gadgets/src/poseidon/pow5.rs:477:73
|
477 | let r_0 = (p[0] + config.round_constants[round][0]).pow(&config.alpha);
| ^^^^^^^^^^^^^ help: change this to: `config.alpha`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
Check warning on line 451 in halo2_gadgets/src/poseidon/pow5.rs
github-actions / Clippy (beta)
the borrowed expression implements the required traits
warning: the borrowed expression implements the required traits
--> halo2_gadgets/src/poseidon/pow5.rs:451:62
|
451 | let r: Value<Vec<F>> = q.map(|q| q.map(|q| q.pow(&config.alpha))).collect();
| ^^^^^^^^^^^^^ help: change this to: `config.alpha`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
Check warning on line 265 in halo2_gadgets/src/poseidon/pow5.rs
github-actions / Clippy (beta)
usage of `Iterator::fold` on a type that implements `Try`
warning: usage of `Iterator::fold` on a type that implements `Try`
--> halo2_gadgets/src/poseidon/pow5.rs:256:58
|
256 | let state = (0..config.half_full_rounds).fold(Ok(state), |res, r| {
| __________________________________________________________^
257 | | res.and_then(|state| {
258 | | state.full_round(
259 | | &mut region,
... |
264 | | })
265 | | })?;
| |__________________^ help: use `try_fold` instead: `try_fold(state, |res, r| ...)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_try_fold
Check warning on line 254 in halo2_gadgets/src/poseidon/pow5.rs
github-actions / Clippy (beta)
usage of `Iterator::fold` on a type that implements `Try`
warning: usage of `Iterator::fold` on a type that implements `Try`
--> halo2_gadgets/src/poseidon/pow5.rs:245:61
|
245 | let state = (0..config.half_partial_rounds).fold(Ok(state), |res, r| {
| _____________________________________________________________^
246 | | res.and_then(|state| {
247 | | state.partial_round(
248 | | &mut region,
... |
253 | | })
254 | | })?;
| |__________________^ help: use `try_fold` instead: `try_fold(state, |res, r| ...)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_try_fold
Check warning on line 243 in halo2_gadgets/src/poseidon/pow5.rs
github-actions / Clippy (beta)
usage of `Iterator::fold` on a type that implements `Try`
warning: usage of `Iterator::fold` on a type that implements `Try`
--> halo2_gadgets/src/poseidon/pow5.rs:241:58
|
241 | let state = (0..config.half_full_rounds).fold(Ok(state), |res, r| {
| __________________________________________________________^
242 | | res.and_then(|state| state.full_round(&mut region, config, r, r))
243 | | })?;
| |__________________^ help: use `try_fold` instead: `try_fold(state, |res, r| ...)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_try_fold
= note: `-W clippy::manual-try-fold` implied by `-W clippy::all`
= help: to override `-W clippy::all` add `#[allow(clippy::manual_try_fold)]`
Check warning on line 395 in halo2_gadgets/src/ecc/chip/mul_fixed.rs
github-actions / Clippy (beta)
the borrowed expression implements the required traits
warning: the borrowed expression implements the required traits
--> halo2_gadgets/src/ecc/chip/mul_fixed.rs:395:42
|
395 | .map(|k| k * (*H_SCALAR).pow(&[(NUM_WINDOWS - 1) as u64, 0, 0, 0]) - offset_acc);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `[(NUM_WINDOWS - 1) as u64, 0, 0, 0]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
Check warning on line 390 in halo2_gadgets/src/ecc/chip/mul_fixed.rs
github-actions / Clippy (beta)
the borrowed expression implements the required traits
warning: the borrowed expression implements the required traits
--> halo2_gadgets/src/ecc/chip/mul_fixed.rs:390:37
|
390 | acc + (*TWO_SCALAR).pow(&[FIXED_BASE_WINDOW_SIZE as u64 * w as u64 + 1, 0, 0, 0])
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `[FIXED_BASE_WINDOW_SIZE as u64 * w as u64 + 1, 0, 0, 0]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
Check warning on line 373 in halo2_gadgets/src/ecc/chip/mul_fixed.rs
github-actions / Clippy (beta)
the borrowed expression implements the required traits
warning: the borrowed expression implements the required traits
--> halo2_gadgets/src/ecc/chip/mul_fixed.rs:373:68
|
373 | let scalar = k.map(|k| (k + *TWO_SCALAR) * (*H_SCALAR).pow(&[w as u64, 0, 0, 0]));
| ^^^^^^^^^^^^^^^^^^^^ help: change this to: `[w as u64, 0, 0, 0]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
Check warning on line 220 in halo2_gadgets/src/ecc/chip/constants.rs
github-actions / Clippy (beta)
the borrowed expression implements the required traits
warning: the borrowed expression implements the required traits
--> halo2_gadgets/src/ecc/chip/constants.rs:220:45
|
220 | * C::Scalar::from(H as u64).pow(&[(num_windows - 1) as u64, 0, 0, 0])
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `[(num_windows - 1) as u64, 0, 0, 0]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
Check warning on line 217 in halo2_gadgets/src/ecc/chip/constants.rs
github-actions / Clippy (beta)
the borrowed expression implements the required traits
warning: the borrowed expression implements the required traits
--> halo2_gadgets/src/ecc/chip/constants.rs:217:42
|
217 | acc + C::Scalar::from(2).pow(&[FIXED_BASE_WINDOW_SIZE as u64 * w as u64 + 1, 0, 0, 0])
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `[FIXED_BASE_WINDOW_SIZE as u64 * w as u64 + 1, 0, 0, 0]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
Check warning on line 200 in halo2_gadgets/src/ecc/chip/constants.rs
github-actions / Clippy (beta)
the borrowed expression implements the required traits
warning: the borrowed expression implements the required traits
--> halo2_gadgets/src/ecc/chip/constants.rs:200:53
|
200 | * C::Scalar::from(H as u64).pow(&[idx as u64, 0, 0, 0]);
| ^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `[idx as u64, 0, 0, 0]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args