Skip to content

cleanup code

cleanup code #199

GitHub Actions / Clippy (beta) succeeded May 13, 2024 in 2s

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.4 (a26981974 2024-05-10)
  • cargo 1.79.0-beta.4 (8a7384119 2024-05-03)
  • clippy 0.1.79 (a269819 2024-05-10)

Annotations

Check warning on line 408 in halo2_gadgets/src/utilities.rs

See this annotation in the file changed.

@github-actions 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:408:47
    |
408 |         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
    |
408 |         decompose(pallas::Base::random(rng), &(0..255).collect::<std::vec::Vec<usize>>());
    |                                               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
help: if you wanted an array of len 255, try
    |
408 |         decompose(pallas::Base::random(rng), &[0; 255]);
    |                                                ~~~~~~

Check warning on line 128 in halo2_gadgets/src/utilities.rs

See this annotation in the file changed.

@github-actions 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:128:34
    |
128 |             _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 119 in halo2_gadgets/src/utilities.rs

See this annotation in the file changed.

@github-actions 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:119:34
    |
119 |             _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 104 in halo2_gadgets/src/utilities.rs

See this annotation in the file changed.

@github-actions 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:104:34
    |
104 |             _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 687 in halo2_gadgets/src/utilities/lookup_range_check.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (beta)

accessing first element with `proofs.get(0)`

warning: accessing first element with `proofs.get(0)`
   --> halo2_gadgets/src/utilities/lookup_range_check.rs:687:23
    |
687 |                 match proofs.get(0) {
    |                       ^^^^^^^^^^^^^ help: try: `proofs.first()`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first
    = note: `-W clippy::get-first` implied by `-W clippy::all`
    = help: to override `-W clippy::all` add `#[allow(clippy::get_first)]`

Check warning on line 56 in halo2_gadgets/src/utilities/lookup_range_check.rs

See this annotation in the file changed.

@github-actions 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:56:38
   |
56 |                 _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 678 in halo2_gadgets/src/sinsemilla.rs

See this annotation in the file changed.

@github-actions 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:678:48
    |
678 | ...                   .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/a26981974230110fa8fb15e1cf04d05b9a2103f9/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 677 in halo2_gadgets/src/sinsemilla.rs

See this annotation in the file changed.

@github-actions 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:677:48
    |
677 | ...                   .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/a26981974230110fa8fb15e1cf04d05b9a2103f9/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 127 in halo2_gadgets/benches/poseidon.rs

See this annotation in the file changed.

@github-actions 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)]`

Check warning on line 458 in /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/uint-0.9.5/src/uint.rs

See this annotation in the file changed.

@github-actions 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)

Check warning on line 448 in /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/uint-0.9.5/src/uint.rs

See this annotation in the file changed.

@github-actions 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)

Check warning on line 458 in /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/uint-0.9.5/src/uint.rs

See this annotation in the file changed.

@github-actions 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)

Check warning on line 448 in /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/uint-0.9.5/src/uint.rs

See this annotation in the file changed.

@github-actions 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)

Check warning on line 458 in /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/uint-0.9.5/src/uint.rs

See this annotation in the file changed.

@github-actions 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)

Check warning on line 448 in /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/uint-0.9.5/src/uint.rs

See this annotation in the file changed.

@github-actions 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)

Check warning on line 458 in /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/uint-0.9.5/src/uint.rs

See this annotation in the file changed.

@github-actions 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)

Check warning on line 448 in /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/uint-0.9.5/src/uint.rs

See this annotation in the file changed.

@github-actions 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)

Check warning on line 458 in /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/uint-0.9.5/src/uint.rs

See this annotation in the file changed.

@github-actions 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)

Check warning on line 448 in /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/uint-0.9.5/src/uint.rs

See this annotation in the file changed.

@github-actions 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)

Check warning on line 458 in /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/uint-0.9.5/src/uint.rs

See this annotation in the file changed.

@github-actions 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)

Check warning on line 448 in /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/uint-0.9.5/src/uint.rs

See this annotation in the file changed.

@github-actions 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)

Check warning on line 458 in /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/uint-0.9.5/src/uint.rs

See this annotation in the file changed.

@github-actions 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)

Check warning on line 448 in /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/uint-0.9.5/src/uint.rs

See this annotation in the file changed.

@github-actions 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)

Check warning on line 458 in /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/uint-0.9.5/src/uint.rs

See this annotation in the file changed.

@github-actions 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)

Check warning on line 448 in /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/uint-0.9.5/src/uint.rs

See this annotation in the file changed.

@github-actions 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)