fix poly degree 0 underflow #10
Clippy (1.56.1)
68 errors
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 68 |
Warning | 0 |
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 failure on line 203 in halo2_proofs/src/dev/graph/layout.rs
github-actions / Clippy (1.56.1)
the borrowed expression implements the required traits
error: the borrowed expression implements the required traits
--> halo2_proofs/src/dev/graph/layout.rs:203:65
|
203 | root.draw(&Rectangle::new([top_left, bottom_right], &BLACK))?;
| ^^^^^^ help: change this to: `BLACK`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
Check failure on line 187 in halo2_proofs/src/dev/graph/layout.rs
github-actions / Clippy (1.56.1)
the borrowed expression implements the required traits
error: the borrowed expression implements the required traits
--> halo2_proofs/src/dev/graph/layout.rs:187:13
|
187 | &BLACK,
| ^^^^^^ help: change this to: `BLACK`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
Check failure on line 458 in halo2_proofs/src/transcript.rs
github-actions / Clippy (1.56.1)
the borrowed expression implements the required traits
error: the borrowed expression implements the required traits
--> halo2_proofs/src/transcript.rs:458:27
|
458 | self.state.update(&[KECCAK256_PREFIX_SCALAR]);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `[KECCAK256_PREFIX_SCALAR]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
Check failure on line 444 in halo2_proofs/src/transcript.rs
github-actions / Clippy (1.56.1)
the borrowed expression implements the required traits
error: the borrowed expression implements the required traits
--> halo2_proofs/src/transcript.rs:444:27
|
444 | self.state.update(&[KECCAK256_PREFIX_POINT]);
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `[KECCAK256_PREFIX_POINT]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
Check failure on line 432 in halo2_proofs/src/transcript.rs
github-actions / Clippy (1.56.1)
the borrowed expression implements the required traits
error: the borrowed expression implements the required traits
--> halo2_proofs/src/transcript.rs:432:25
|
432 | state_hi.update(&[KECCAK256_PREFIX_CHALLENGE_HI]);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `[KECCAK256_PREFIX_CHALLENGE_HI]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
Check failure on line 431 in halo2_proofs/src/transcript.rs
github-actions / Clippy (1.56.1)
the borrowed expression implements the required traits
error: the borrowed expression implements the required traits
--> halo2_proofs/src/transcript.rs:431:25
|
431 | state_lo.update(&[KECCAK256_PREFIX_CHALLENGE_LO]);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `[KECCAK256_PREFIX_CHALLENGE_LO]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
Check failure on line 427 in halo2_proofs/src/transcript.rs
github-actions / Clippy (1.56.1)
the borrowed expression implements the required traits
error: the borrowed expression implements the required traits
--> halo2_proofs/src/transcript.rs:427:27
|
427 | self.state.update(&[KECCAK256_PREFIX_CHALLENGE]);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `[KECCAK256_PREFIX_CHALLENGE]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
Check failure on line 284 in halo2_proofs/src/transcript.rs
github-actions / Clippy (1.56.1)
the borrowed expression implements the required traits
error: the borrowed expression implements the required traits
--> halo2_proofs/src/transcript.rs:284:27
|
284 | self.state.update(&[KECCAK256_PREFIX_SCALAR]);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `[KECCAK256_PREFIX_SCALAR]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
Check failure on line 270 in halo2_proofs/src/transcript.rs
github-actions / Clippy (1.56.1)
the borrowed expression implements the required traits
error: the borrowed expression implements the required traits
--> halo2_proofs/src/transcript.rs:270:27
|
270 | self.state.update(&[KECCAK256_PREFIX_POINT]);
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `[KECCAK256_PREFIX_POINT]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
Check failure on line 258 in halo2_proofs/src/transcript.rs
github-actions / Clippy (1.56.1)
the borrowed expression implements the required traits
error: the borrowed expression implements the required traits
--> halo2_proofs/src/transcript.rs:258:25
|
258 | state_hi.update(&[KECCAK256_PREFIX_CHALLENGE_HI]);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `[KECCAK256_PREFIX_CHALLENGE_HI]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
Check failure on line 257 in halo2_proofs/src/transcript.rs
github-actions / Clippy (1.56.1)
the borrowed expression implements the required traits
error: the borrowed expression implements the required traits
--> halo2_proofs/src/transcript.rs:257:25
|
257 | state_lo.update(&[KECCAK256_PREFIX_CHALLENGE_LO]);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `[KECCAK256_PREFIX_CHALLENGE_LO]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
Check failure on line 253 in halo2_proofs/src/transcript.rs
github-actions / Clippy (1.56.1)
the borrowed expression implements the required traits
error: the borrowed expression implements the required traits
--> halo2_proofs/src/transcript.rs:253:27
|
253 | self.state.update(&[KECCAK256_PREFIX_CHALLENGE]);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `[KECCAK256_PREFIX_CHALLENGE]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
Check failure on line 104 in halo2_proofs/src/poly/kzg/commitment.rs
github-actions / Clippy (1.56.1)
the borrowed expression implements the required traits
error: the borrowed expression implements the required traits
--> halo2_proofs/src/poly/kzg/commitment.rs:104:49
|
104 | let root_pow = root.pow_vartime(&[offset as u64]);
| ^^^^^^^^^^^^^^^^ help: change this to: `[offset as u64]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
Check failure on line 100 in halo2_proofs/src/poly/kzg/commitment.rs
github-actions / Clippy (1.56.1)
casting to the same type is unnecessary (`u64` -> `u64`)
error: casting to the same type is unnecessary (`u64` -> `u64`)
--> halo2_proofs/src/poly/kzg/commitment.rs:100:43
|
100 | let multiplier = (s.pow_vartime(&[n as u64]) - E::Scalar::ONE) * n_inv;
| ^^^^^^^^ help: try: `n`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
Check failure on line 100 in halo2_proofs/src/poly/kzg/commitment.rs
github-actions / Clippy (1.56.1)
the borrowed expression implements the required traits
error: the borrowed expression implements the required traits
--> halo2_proofs/src/poly/kzg/commitment.rs:100:41
|
100 | let multiplier = (s.pow_vartime(&[n as u64]) - E::Scalar::ONE) * n_inv;
| ^^^^^^^^^^^ help: change this to: `[n as u64]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
Check failure on line 78 in halo2_proofs/src/poly/kzg/commitment.rs
github-actions / Clippy (1.56.1)
the borrowed expression implements the required traits
error: the borrowed expression implements the required traits
--> halo2_proofs/src/poly/kzg/commitment.rs:78:40
|
78 | current_g *= s.pow_vartime(&[start as u64]);
| ^^^^^^^^^^^^^^^ help: change this to: `[start as u64]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
Check failure on line 620 in halo2_proofs/src/poly/domain.rs
github-actions / Clippy (1.56.1)
the borrowed expression implements the required traits
error: the borrowed expression implements the required traits
--> halo2_proofs/src/poly/domain.rs:620:30
|
620 | .pow_vartime(&[(rotation.0 as i64).unsigned_abs()]);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `[(rotation.0 as i64).unsigned_abs()]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
Check failure on line 616 in halo2_proofs/src/poly/domain.rs
github-actions / Clippy (1.56.1)
the borrowed expression implements the required traits
error: the borrowed expression implements the required traits
--> halo2_proofs/src/poly/domain.rs:616:52
|
616 | point *= &self.get_omega().pow_vartime(&[rotation.0 as u64]);
| ^^^^^^^^^^^^^^^^^^^^ help: change this to: `[rotation.0 as u64]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
Check failure on line 550 in halo2_proofs/src/poly/domain.rs
github-actions / Clippy (1.56.1)
the borrowed expression implements the required traits
error: the borrowed expression implements the required traits
--> halo2_proofs/src/poly/domain.rs:550:45
|
550 | let mut c_power = c.pow_vartime(&[index as u64, 0, 0, 0]);
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `[index as u64, 0, 0, 0]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
Check failure on line 195 in halo2_proofs/src/poly/domain.rs
github-actions / Clippy (1.56.1)
casting to the same type is unnecessary (`usize` -> `usize`)
error: casting to the same type is unnecessary (`usize` -> `usize`)
--> halo2_proofs/src/poly/domain.rs:195:34
|
195 | assert_eq!(values.len(), (self.extended_len() >> self.k) as usize);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(self.extended_len() >> self.k)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
Check failure on line 103 in halo2_proofs/src/poly/domain.rs
github-actions / Clippy (1.56.1)
casting to the same type is unnecessary (`u64` -> `u64`)
error: casting to the same type is unnecessary (`u64` -> `u64`)
--> halo2_proofs/src/poly/domain.rs:103:53
|
103 | let step = extended_omega.pow_vartime(&[n as u64, 0, 0, 0]);
| ^^^^^^^^ help: try: `n`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
Check failure on line 103 in halo2_proofs/src/poly/domain.rs
github-actions / Clippy (1.56.1)
the borrowed expression implements the required traits
error: the borrowed expression implements the required traits
--> halo2_proofs/src/poly/domain.rs:103:51
|
103 | let step = extended_omega.pow_vartime(&[n as u64, 0, 0, 0]);
| ^^^^^^^^^^^^^^^^^^^^ help: change this to: `[n as u64, 0, 0, 0]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
Check failure on line 102 in halo2_proofs/src/poly/domain.rs
github-actions / Clippy (1.56.1)
casting to the same type is unnecessary (`u64` -> `u64`)
error: casting to the same type is unnecessary (`u64` -> `u64`)
--> halo2_proofs/src/poly/domain.rs:102:46
|
102 | let orig = F::ZETA.pow_vartime(&[n as u64, 0, 0, 0]);
| ^^^^^^^^ help: try: `n`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
Check failure on line 102 in halo2_proofs/src/poly/domain.rs
github-actions / Clippy (1.56.1)
the borrowed expression implements the required traits
error: the borrowed expression implements the required traits
--> halo2_proofs/src/poly/domain.rs:102:44
|
102 | let orig = F::ZETA.pow_vartime(&[n as u64, 0, 0, 0]);
| ^^^^^^^^^^^^^^^^^^^^ help: change this to: `[n as u64, 0, 0, 0]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
Check failure on line 249 in halo2_proofs/src/plonk/verifier.rs
github-actions / Clippy (1.56.1)
casting to the same type is unnecessary (`u64` -> `u64`)
error: casting to the same type is unnecessary (`u64` -> `u64`)
--> halo2_proofs/src/plonk/verifier.rs:249:26
|
249 | let xn = x.pow(&[params.n() as u64, 0, 0, 0]);
| ^^^^^^^^^^^^^^^^^ help: try: `params.n()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast