Add ZSA functionality (upstream) #14
Clippy (beta)
134 warnings
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 0 |
Warning | 134 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.79.0-beta.1 (6b544f5ff 2024-04-28)
- cargo 1.79.0-beta.1 (b60a15551 2024-04-26)
- clippy 0.1.79 (6b544f5 2024-04-28)
Annotations
Check warning on line 407 in halo2_gadgets/src/utilities.rs
github-actions / Clippy (beta)
an array of `Range` that is only one element
warning: an array of `Range` that is only one element
--> halo2_gadgets/src/utilities.rs:407:47
|
407 | decompose(pallas::Base::random(rng), &[0..255]);
| ^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_range_in_vec_init
= note: `-W clippy::single-range-in-vec-init` implied by `-W clippy::all`
= help: to override `-W clippy::all` add `#[allow(clippy::single_range_in_vec_init)]`
help: if you wanted a `Vec` that contains the entire range, try
|
407 | decompose(pallas::Base::random(rng), &(0..255).collect::<std::vec::Vec<usize>>());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
help: if you wanted an array of len 255, try
|
407 | decompose(pallas::Base::random(rng), &[0; 255]);
| ~~~~~~
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 752 in halo2_gadgets/src/sinsemilla.rs
github-actions / Clippy (beta)
explicit call to `.into_iter()` in function argument accepting `IntoIterator`
warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator`
--> halo2_gadgets/src/sinsemilla.rs:752:48
|
752 | ... .chain(right.into_iter()),
| ^^^^^^^^^^^^^^^^^ help: consider removing the `.into_iter()`: `right`
|
note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()`
--> /rustc/6b544f5ff8d45221d61962651a5f5ab9fe535e16/library/core/src/iter/traits/iterator.rs:484:12
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
Check warning on line 751 in halo2_gadgets/src/sinsemilla.rs
github-actions / Clippy (beta)
explicit call to `.into_iter()` in function argument accepting `IntoIterator`
warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator`
--> halo2_gadgets/src/sinsemilla.rs:751:48
|
751 | ... .chain(left.into_iter())
| ^^^^^^^^^^^^^^^^ help: consider removing the `.into_iter()`: `left`
|
note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()`
--> /rustc/6b544f5ff8d45221d61962651a5f5ab9fe535e16/library/core/src/iter/traits/iterator.rs:484:12
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
= note: `-W clippy::useless-conversion` implied by `-W clippy::all`
= help: to override `-W clippy::all` add `#[allow(clippy::useless_conversion)]`
Check warning on line 351 in halo2_gadgets/src/sinsemilla/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/sinsemilla/primitives.rs:351:31
|
351 | let mut os_rng = OsRng::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 127 in halo2_gadgets/benches/poseidon.rs
github-actions / Clippy (beta)
the borrowed expression implements the required traits
warning: the borrowed expression implements the required traits
--> halo2_gadgets/benches/poseidon.rs:127:25
|
127 | val.pow_vartime(&[5])
| ^^^^ help: change this to: `[5]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
= note: `-W clippy::needless-borrows-for-generic-args` implied by `-W clippy::all`
= help: to override `-W clippy::all` add `#[allow(clippy::needless_borrows_for_generic_args)]`
github-actions / Clippy (beta)
non-local `impl` definition, they should be avoided as they go against expectation
warning: non-local `impl` definition, they should be avoided as they go against expectation
--> halo2_gadgets/src/ecc/chip/mul.rs:422:5
|
422 | / construct_uint! {
423 | | struct U256(4);
424 | | }
| |_____^
|
= help: move this `impl` block outside the of the current function `decompose_for_scalar_mul`
= note: an `impl` definition is non-local if it is nested inside an item and may impact type checking outside of that item. This can be the case if neither the trait or the self type are at the same nesting level as the `impl`
= note: one exception to the rule are anon-const (`const _: () = { ... }`) at top-level module and anon-const at the same nesting as the trait or type
= note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
= note: the macro `$crate::impl_mul_for_primitive` may come from an old version of the `uint` crate, try updating your dependency with `cargo update -p uint`
= note: this warning originates in the macro `$crate::impl_mul_for_primitive` which comes from the expansion of the macro `construct_uint` (in Nightly builds, run with -Z macro-backtrace for more info)
github-actions / Clippy (beta)
non-local `impl` definition, they should be avoided as they go against expectation
warning: non-local `impl` definition, they should be avoided as they go against expectation
--> halo2_gadgets/src/ecc/chip/mul.rs:422:5
|
422 | / construct_uint! {
423 | | struct U256(4);
424 | | }
| |_____^
|
= help: move this `impl` block outside the of the current function `decompose_for_scalar_mul`
= note: an `impl` definition is non-local if it is nested inside an item and may impact type checking outside of that item. This can be the case if neither the trait or the self type are at the same nesting level as the `impl`
= note: one exception to the rule are anon-const (`const _: () = { ... }`) at top-level module and anon-const at the same nesting as the trait or type
= note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
= note: the macro `$crate::impl_mul_for_primitive` may come from an old version of the `uint` crate, try updating your dependency with `cargo update -p uint`
= note: this warning originates in the macro `$crate::impl_mul_for_primitive` which comes from the expansion of the macro `construct_uint` (in Nightly builds, run with -Z macro-backtrace for more info)
github-actions / Clippy (beta)
non-local `impl` definition, they should be avoided as they go against expectation
warning: non-local `impl` definition, they should be avoided as they go against expectation
--> halo2_gadgets/src/ecc/chip/mul.rs:422:5
|
422 | / construct_uint! {
423 | | struct U256(4);
424 | | }
| |_____^
|
= help: move this `impl` block outside the of the current function `decompose_for_scalar_mul`
= note: an `impl` definition is non-local if it is nested inside an item and may impact type checking outside of that item. This can be the case if neither the trait or the self type are at the same nesting level as the `impl`
= note: one exception to the rule are anon-const (`const _: () = { ... }`) at top-level module and anon-const at the same nesting as the trait or type
= note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
= note: the macro `$crate::impl_mul_for_primitive` may come from an old version of the `uint` crate, try updating your dependency with `cargo update -p uint`
= note: this warning originates in the macro `$crate::impl_mul_for_primitive` which comes from the expansion of the macro `construct_uint` (in Nightly builds, run with -Z macro-backtrace for more info)
github-actions / Clippy (beta)
non-local `impl` definition, they should be avoided as they go against expectation
warning: non-local `impl` definition, they should be avoided as they go against expectation
--> halo2_gadgets/src/ecc/chip/mul.rs:422:5
|
422 | / construct_uint! {
423 | | struct U256(4);
424 | | }
| |_____^
|
= help: move this `impl` block outside the of the current function `decompose_for_scalar_mul`
= note: an `impl` definition is non-local if it is nested inside an item and may impact type checking outside of that item. This can be the case if neither the trait or the self type are at the same nesting level as the `impl`
= note: one exception to the rule are anon-const (`const _: () = { ... }`) at top-level module and anon-const at the same nesting as the trait or type
= note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
= note: the macro `$crate::impl_mul_for_primitive` may come from an old version of the `uint` crate, try updating your dependency with `cargo update -p uint`
= note: this warning originates in the macro `$crate::impl_mul_for_primitive` which comes from the expansion of the macro `construct_uint` (in Nightly builds, run with -Z macro-backtrace for more info)
github-actions / Clippy (beta)
non-local `impl` definition, they should be avoided as they go against expectation
warning: non-local `impl` definition, they should be avoided as they go against expectation
--> halo2_gadgets/src/ecc/chip/mul.rs:422:5
|
422 | / construct_uint! {
423 | | struct U256(4);
424 | | }
| |_____^
|
= help: move this `impl` block outside the of the current function `decompose_for_scalar_mul`
= note: an `impl` definition is non-local if it is nested inside an item and may impact type checking outside of that item. This can be the case if neither the trait or the self type are at the same nesting level as the `impl`
= note: one exception to the rule are anon-const (`const _: () = { ... }`) at top-level module and anon-const at the same nesting as the trait or type
= note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
= note: the macro `$crate::impl_mul_for_primitive` may come from an old version of the `uint` crate, try updating your dependency with `cargo update -p uint`
= note: this warning originates in the macro `$crate::impl_mul_for_primitive` which comes from the expansion of the macro `construct_uint` (in Nightly builds, run with -Z macro-backtrace for more info)
github-actions / Clippy (beta)
non-local `impl` definition, they should be avoided as they go against expectation
warning: non-local `impl` definition, they should be avoided as they go against expectation
--> halo2_gadgets/src/ecc/chip/mul.rs:422:5
|
422 | / construct_uint! {
423 | | struct U256(4);
424 | | }
| |_____^
|
= help: move this `impl` block outside the of the current function `decompose_for_scalar_mul`
= note: an `impl` definition is non-local if it is nested inside an item and may impact type checking outside of that item. This can be the case if neither the trait or the self type are at the same nesting level as the `impl`
= note: one exception to the rule are anon-const (`const _: () = { ... }`) at top-level module and anon-const at the same nesting as the trait or type
= note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
= note: the macro `$crate::impl_mul_for_primitive` may come from an old version of the `uint` crate, try updating your dependency with `cargo update -p uint`
= note: this warning originates in the macro `$crate::impl_mul_for_primitive` which comes from the expansion of the macro `construct_uint` (in Nightly builds, run with -Z macro-backtrace for more info)
github-actions / Clippy (beta)
non-local `impl` definition, they should be avoided as they go against expectation
warning: non-local `impl` definition, they should be avoided as they go against expectation
--> halo2_gadgets/src/ecc/chip/mul.rs:422:5
|
422 | / construct_uint! {
423 | | struct U256(4);
424 | | }
| |_____^
|
= help: move this `impl` block outside the of the current function `decompose_for_scalar_mul`
= note: an `impl` definition is non-local if it is nested inside an item and may impact type checking outside of that item. This can be the case if neither the trait or the self type are at the same nesting level as the `impl`
= note: one exception to the rule are anon-const (`const _: () = { ... }`) at top-level module and anon-const at the same nesting as the trait or type
= note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
= note: the macro `$crate::impl_mul_for_primitive` may come from an old version of the `uint` crate, try updating your dependency with `cargo update -p uint`
= note: this warning originates in the macro `$crate::impl_mul_for_primitive` which comes from the expansion of the macro `construct_uint` (in Nightly builds, run with -Z macro-backtrace for more info)
github-actions / Clippy (beta)
non-local `impl` definition, they should be avoided as they go against expectation
warning: non-local `impl` definition, they should be avoided as they go against expectation
--> halo2_gadgets/src/ecc/chip/mul.rs:422:5
|
422 | / construct_uint! {
423 | | struct U256(4);
424 | | }
| |_____^
|
= help: move this `impl` block outside the of the current function `decompose_for_scalar_mul`
= note: an `impl` definition is non-local if it is nested inside an item and may impact type checking outside of that item. This can be the case if neither the trait or the self type are at the same nesting level as the `impl`
= note: one exception to the rule are anon-const (`const _: () = { ... }`) at top-level module and anon-const at the same nesting as the trait or type
= note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
= note: the macro `$crate::impl_mul_for_primitive` may come from an old version of the `uint` crate, try updating your dependency with `cargo update -p uint`
= note: this warning originates in the macro `$crate::impl_mul_for_primitive` which comes from the expansion of the macro `construct_uint` (in Nightly builds, run with -Z macro-backtrace for more info)
github-actions / Clippy (beta)
non-local `impl` definition, they should be avoided as they go against expectation
warning: non-local `impl` definition, they should be avoided as they go against expectation
--> halo2_gadgets/src/ecc/chip/mul.rs:422:5
|
422 | / construct_uint! {
423 | | struct U256(4);
424 | | }
| |_____^
|
= help: move this `impl` block outside the of the current function `decompose_for_scalar_mul`
= note: an `impl` definition is non-local if it is nested inside an item and may impact type checking outside of that item. This can be the case if neither the trait or the self type are at the same nesting level as the `impl`
= note: one exception to the rule are anon-const (`const _: () = { ... }`) at top-level module and anon-const at the same nesting as the trait or type
= note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
= note: the macro `$crate::impl_mul_for_primitive` may come from an old version of the `uint` crate, try updating your dependency with `cargo update -p uint`
= note: this warning originates in the macro `$crate::impl_mul_for_primitive` which comes from the expansion of the macro `construct_uint` (in Nightly builds, run with -Z macro-backtrace for more info)
github-actions / Clippy (beta)
non-local `impl` definition, they should be avoided as they go against expectation
warning: non-local `impl` definition, they should be avoided as they go against expectation
--> halo2_gadgets/src/ecc/chip/mul.rs:422:5
|
422 | / construct_uint! {
423 | | struct U256(4);
424 | | }
| |_____^
|
= help: move this `impl` block outside the of the current function `decompose_for_scalar_mul`
= note: an `impl` definition is non-local if it is nested inside an item and may impact type checking outside of that item. This can be the case if neither the trait or the self type are at the same nesting level as the `impl`
= note: one exception to the rule are anon-const (`const _: () = { ... }`) at top-level module and anon-const at the same nesting as the trait or type
= note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
= note: the macro `$crate::impl_mul_for_primitive` may come from an old version of the `uint` crate, try updating your dependency with `cargo update -p uint`
= note: this warning originates in the macro `$crate::impl_mul_for_primitive` which comes from the expansion of the macro `construct_uint` (in Nightly builds, run with -Z macro-backtrace for more info)
github-actions / Clippy (beta)
non-local `impl` definition, they should be avoided as they go against expectation
warning: non-local `impl` definition, they should be avoided as they go against expectation
--> halo2_gadgets/src/ecc/chip/mul.rs:422:5
|
422 | / construct_uint! {
423 | | struct U256(4);
424 | | }
| |_____^
|
= help: move this `impl` block outside the of the current function `decompose_for_scalar_mul`
= note: an `impl` definition is non-local if it is nested inside an item and may impact type checking outside of that item. This can be the case if neither the trait or the self type are at the same nesting level as the `impl`
= note: one exception to the rule are anon-const (`const _: () = { ... }`) at top-level module and anon-const at the same nesting as the trait or type
= note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
= note: the macro `$crate::impl_mul_for_primitive` may come from an old version of the `uint` crate, try updating your dependency with `cargo update -p uint`
= note: this warning originates in the macro `$crate::impl_mul_for_primitive` which comes from the expansion of the macro `construct_uint` (in Nightly builds, run with -Z macro-backtrace for more info)
github-actions / Clippy (beta)
non-local `impl` definition, they should be avoided as they go against expectation
warning: non-local `impl` definition, they should be avoided as they go against expectation
--> halo2_gadgets/src/ecc/chip/mul.rs:422:5
|
422 | / construct_uint! {
423 | | struct U256(4);
424 | | }
| |_____^
|
= help: move this `impl` block outside the of the current function `decompose_for_scalar_mul`
= note: an `impl` definition is non-local if it is nested inside an item and may impact type checking outside of that item. This can be the case if neither the trait or the self type are at the same nesting level as the `impl`
= note: one exception to the rule are anon-const (`const _: () = { ... }`) at top-level module and anon-const at the same nesting as the trait or type
= note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
= note: the macro `$crate::impl_mul_for_primitive` may come from an old version of the `uint` crate, try updating your dependency with `cargo update -p uint`
= note: this warning originates in the macro `$crate::impl_mul_for_primitive` which comes from the expansion of the macro `construct_uint` (in Nightly builds, run with -Z macro-backtrace for more info)
github-actions / Clippy (beta)
non-local `impl` definition, they should be avoided as they go against expectation
warning: non-local `impl` definition, they should be avoided as they go against expectation
--> halo2_gadgets/src/ecc/chip/mul.rs:422:5
|
422 | / construct_uint! {
423 | | struct U256(4);
424 | | }
| |_____^
|
= help: move this `impl` block outside the of the current function `decompose_for_scalar_mul`
= note: an `impl` definition is non-local if it is nested inside an item and may impact type checking outside of that item. This can be the case if neither the trait or the self type are at the same nesting level as the `impl`
= note: one exception to the rule are anon-const (`const _: () = { ... }`) at top-level module and anon-const at the same nesting as the trait or type
= note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
= note: the macro `$crate::impl_mul_for_primitive` may come from an old version of the `uint` crate, try updating your dependency with `cargo update -p uint`
= note: this warning originates in the macro `$crate::impl_mul_for_primitive` which comes from the expansion of the macro `construct_uint` (in Nightly builds, run with -Z macro-backtrace for more info)
github-actions / Clippy (beta)
non-local `impl` definition, they should be avoided as they go against expectation
warning: non-local `impl` definition, they should be avoided as they go against expectation
--> halo2_gadgets/src/ecc/chip/mul.rs:422:5
|
422 | / construct_uint! {
423 | | struct U256(4);
424 | | }
| |_____^
|
= help: move this `impl` block outside the of the current function `decompose_for_scalar_mul`
= note: an `impl` definition is non-local if it is nested inside an item and may impact type checking outside of that item. This can be the case if neither the trait or the self type are at the same nesting level as the `impl`
= note: one exception to the rule are anon-const (`const _: () = { ... }`) at top-level module and anon-const at the same nesting as the trait or type
= note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
= note: the macro `$crate::impl_mul_for_primitive` may come from an old version of the `uint` crate, try updating your dependency with `cargo update -p uint`
= note: this warning originates in the macro `$crate::impl_mul_for_primitive` which comes from the expansion of the macro `construct_uint` (in Nightly builds, run with -Z macro-backtrace for more info)
github-actions / Clippy (beta)
non-local `impl` definition, they should be avoided as they go against expectation
warning: non-local `impl` definition, they should be avoided as they go against expectation
--> halo2_gadgets/src/ecc/chip/mul.rs:422:5
|
422 | / construct_uint! {
423 | | struct U256(4);
424 | | }
| |_____^
|
= help: move this `impl` block outside the of the current function `decompose_for_scalar_mul`
= note: an `impl` definition is non-local if it is nested inside an item and may impact type checking outside of that item. This can be the case if neither the trait or the self type are at the same nesting level as the `impl`
= note: one exception to the rule are anon-const (`const _: () = { ... }`) at top-level module and anon-const at the same nesting as the trait or type
= note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
= note: the macro `$crate::impl_mul_for_primitive` may come from an old version of the `uint` crate, try updating your dependency with `cargo update -p uint`
= note: this warning originates in the macro `$crate::impl_mul_for_primitive` which comes from the expansion of the macro `construct_uint` (in Nightly builds, run with -Z macro-backtrace for more info)
github-actions / Clippy (beta)
non-local `impl` definition, they should be avoided as they go against expectation
warning: non-local `impl` definition, they should be avoided as they go against expectation
--> halo2_gadgets/src/ecc/chip/mul.rs:422:5
|
422 | / construct_uint! {
423 | | struct U256(4);
424 | | }
| |_____^
|
= help: move this `impl` block outside the of the current function `decompose_for_scalar_mul`
= note: an `impl` definition is non-local if it is nested inside an item and may impact type checking outside of that item. This can be the case if neither the trait or the self type are at the same nesting level as the `impl`
= note: one exception to the rule are anon-const (`const _: () = { ... }`) at top-level module and anon-const at the same nesting as the trait or type
= note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
= note: the macro `$crate::impl_mul_for_primitive` may come from an old version of the `uint` crate, try updating your dependency with `cargo update -p uint`
= note: this warning originates in the macro `$crate::impl_mul_for_primitive` which comes from the expansion of the macro `construct_uint` (in Nightly builds, run with -Z macro-backtrace for more info)