Skip to content

Refactoring

Refactoring #277

GitHub Actions / Clippy (beta) succeeded Jul 2, 2024 in 1s

Clippy (beta)

145 warnings

Details

Results

Message level Amount
Internal compiler error 0
Error 0
Warning 145
Note 0
Help 0

Versions

  • rustc 1.80.0-beta.4 (64a1fe671 2024-06-21)
  • cargo 1.80.0-beta.4 (34a6a87d8 2024-06-04)
  • clippy 0.1.80 (64a1fe6 2024-06-21)

Annotations

Check warning on line 407 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: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

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: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

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: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

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: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 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 730 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:730:44
    |
730 | ...                   .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/64a1fe67112931359c7c9a222f08fd206255c2b5/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 729 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:729:44
    |
729 | ...                   .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/64a1fe67112931359c7c9a222f08fd206255c2b5/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

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/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

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 450 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, `impl` blocks should be written at the same level as their item

warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
   --> halo2_gadgets/src/ecc/chip/mul.rs:422:5
    |
422 | /     construct_uint! {
423 | |         struct U256(4);
424 | |     }
    | |     ^
    | |     |
    | |_____`&'a U256` is not local
    |       `Mul` is not local
    |
    = note: `impl` may be usable in bounds, etc. from outside the expression, which might e.g. make something constructible that previously wasn't, because it's still on a publicly-visible type
    = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl`
help: move the `impl` block outside of this function `decompose_for_scalar_mul`
   --> halo2_gadgets/src/ecc/chip/mul.rs:421:1
    |
421 |   fn decompose_for_scalar_mul(scalar: Value<&pallas::Base>) -> Vec<Value<bool>> {
    |   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
422 | /     construct_uint! {
423 | |         struct U256(4);
424 | |     }
    | |_____- may need to be moved as well
    = 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 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: 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 440 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, `impl` blocks should be written at the same level as their item

warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
   --> halo2_gadgets/src/ecc/chip/mul.rs:422:5
    |
422 | /     construct_uint! {
423 | |         struct U256(4);
424 | |     }
    | |     ^
    | |     |
    | |_____`&'a U256` is not local
    |       `Mul` is not local
    |
    = note: `impl` may be usable in bounds, etc. from outside the expression, which might e.g. make something constructible that previously wasn't, because it's still on a publicly-visible type
    = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl`
help: move the `impl` block outside of this function `decompose_for_scalar_mul`
   --> halo2_gadgets/src/ecc/chip/mul.rs:421:1
    |
421 |   fn decompose_for_scalar_mul(scalar: Value<&pallas::Base>) -> Vec<Value<bool>> {
    |   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
422 | /     construct_uint! {
423 | |         struct U256(4);
424 | |     }
    | |_____- may need to be moved as well
    = 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 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: 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 450 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, `impl` blocks should be written at the same level as their item

warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
   --> halo2_gadgets/src/ecc/chip/mul.rs:422:5
    |
422 | /     construct_uint! {
423 | |         struct U256(4);
424 | |     }
    | |     ^
    | |     |
    | |_____`&'a U256` is not local
    |       `Mul` is not local
    |
    = note: `impl` may be usable in bounds, etc. from outside the expression, which might e.g. make something constructible that previously wasn't, because it's still on a publicly-visible type
    = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl`
help: move the `impl` block outside of this function `decompose_for_scalar_mul`
   --> halo2_gadgets/src/ecc/chip/mul.rs:421:1
    |
421 |   fn decompose_for_scalar_mul(scalar: Value<&pallas::Base>) -> Vec<Value<bool>> {
    |   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
422 | /     construct_uint! {
423 | |         struct U256(4);
424 | |     }
    | |_____- may need to be moved as well
    = 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 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: 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 440 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, `impl` blocks should be written at the same level as their item

warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
   --> halo2_gadgets/src/ecc/chip/mul.rs:422:5
    |
422 | /     construct_uint! {
423 | |         struct U256(4);
424 | |     }
    | |     ^
    | |     |
    | |_____`&'a U256` is not local
    |       `Mul` is not local
    |
    = note: `impl` may be usable in bounds, etc. from outside the expression, which might e.g. make something constructible that previously wasn't, because it's still on a publicly-visible type
    = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl`
help: move the `impl` block outside of this function `decompose_for_scalar_mul`
   --> halo2_gadgets/src/ecc/chip/mul.rs:421:1
    |
421 |   fn decompose_for_scalar_mul(scalar: Value<&pallas::Base>) -> Vec<Value<bool>> {
    |   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
422 | /     construct_uint! {
423 | |         struct U256(4);
424 | |     }
    | |_____- may need to be moved as well
    = 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 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: 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 450 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, `impl` blocks should be written at the same level as their item

warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
   --> halo2_gadgets/src/ecc/chip/mul.rs:422:5
    |
422 | /     construct_uint! {
423 | |         struct U256(4);
424 | |     }
    | |     ^
    | |     |
    | |_____`&'a U256` is not local
    |       `Mul` is not local
    |
    = note: `impl` may be usable in bounds, etc. from outside the expression, which might e.g. make something constructible that previously wasn't, because it's still on a publicly-visible type
    = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl`
help: move the `impl` block outside of this function `decompose_for_scalar_mul`
   --> halo2_gadgets/src/ecc/chip/mul.rs:421:1
    |
421 |   fn decompose_for_scalar_mul(scalar: Value<&pallas::Base>) -> Vec<Value<bool>> {
    |   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
422 | /     construct_uint! {
423 | |         struct U256(4);
424 | |     }
    | |_____- may need to be moved as well
    = 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 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: 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 440 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, `impl` blocks should be written at the same level as their item

warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
   --> halo2_gadgets/src/ecc/chip/mul.rs:422:5
    |
422 | /     construct_uint! {
423 | |         struct U256(4);
424 | |     }
    | |     ^
    | |     |
    | |_____`&'a U256` is not local
    |       `Mul` is not local
    |
    = note: `impl` may be usable in bounds, etc. from outside the expression, which might e.g. make something constructible that previously wasn't, because it's still on a publicly-visible type
    = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl`
help: move the `impl` block outside of this function `decompose_for_scalar_mul`
   --> halo2_gadgets/src/ecc/chip/mul.rs:421:1
    |
421 |   fn decompose_for_scalar_mul(scalar: Value<&pallas::Base>) -> Vec<Value<bool>> {
    |   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
422 | /     construct_uint! {
423 | |         struct U256(4);
424 | |     }
    | |_____- may need to be moved as well
    = 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 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: 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 450 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, `impl` blocks should be written at the same level as their item

warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
   --> halo2_gadgets/src/ecc/chip/mul.rs:422:5
    |
422 | /     construct_uint! {
423 | |         struct U256(4);
424 | |     }
    | |     ^
    | |     |
    | |_____`&'a U256` is not local
    |       `Mul` is not local
    |
    = note: `impl` may be usable in bounds, etc. from outside the expression, which might e.g. make something constructible that previously wasn't, because it's still on a publicly-visible type
    = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl`
help: move the `impl` block outside of this function `decompose_for_scalar_mul`
   --> halo2_gadgets/src/ecc/chip/mul.rs:421:1
    |
421 |   fn decompose_for_scalar_mul(scalar: Value<&pallas::Base>) -> Vec<Value<bool>> {
    |   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
422 | /     construct_uint! {
423 | |         struct U256(4);
424 | |     }
    | |_____- may need to be moved as well
    = 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 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: 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 440 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, `impl` blocks should be written at the same level as their item

warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
   --> halo2_gadgets/src/ecc/chip/mul.rs:422:5
    |
422 | /     construct_uint! {
423 | |         struct U256(4);
424 | |     }
    | |     ^
    | |     |
    | |_____`&'a U256` is not local
    |       `Mul` is not local
    |
    = note: `impl` may be usable in bounds, etc. from outside the expression, which might e.g. make something constructible that previously wasn't, because it's still on a publicly-visible type
    = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl`
help: move the `impl` block outside of this function `decompose_for_scalar_mul`
   --> halo2_gadgets/src/ecc/chip/mul.rs:421:1
    |
421 |   fn decompose_for_scalar_mul(scalar: Value<&pallas::Base>) -> Vec<Value<bool>> {
    |   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
422 | /     construct_uint! {
423 | |         struct U256(4);
424 | |     }
    | |_____- may need to be moved as well
    = 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 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: 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 450 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, `impl` blocks should be written at the same level as their item

warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
   --> halo2_gadgets/src/ecc/chip/mul.rs:422:5
    |
422 | /     construct_uint! {
423 | |         struct U256(4);
424 | |     }
    | |     ^
    | |     |
    | |_____`&'a U256` is not local
    |       `Mul` is not local
    |
    = note: `impl` may be usable in bounds, etc. from outside the expression, which might e.g. make something constructible that previously wasn't, because it's still on a publicly-visible type
    = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl`
help: move the `impl` block outside of this function `decompose_for_scalar_mul`
   --> halo2_gadgets/src/ecc/chip/mul.rs:421:1
    |
421 |   fn decompose_for_scalar_mul(scalar: Value<&pallas::Base>) -> Vec<Value<bool>> {
    |   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
422 | /     construct_uint! {
423 | |         struct U256(4);
424 | |     }
    | |_____- may need to be moved as well
    = 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 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: 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 440 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, `impl` blocks should be written at the same level as their item

warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
   --> halo2_gadgets/src/ecc/chip/mul.rs:422:5
    |
422 | /     construct_uint! {
423 | |         struct U256(4);
424 | |     }
    | |     ^
    | |     |
    | |_____`&'a U256` is not local
    |       `Mul` is not local
    |
    = note: `impl` may be usable in bounds, etc. from outside the expression, which might e.g. make something constructible that previously wasn't, because it's still on a publicly-visible type
    = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl`
help: move the `impl` block outside of this function `decompose_for_scalar_mul`
   --> halo2_gadgets/src/ecc/chip/mul.rs:421:1
    |
421 |   fn decompose_for_scalar_mul(scalar: Value<&pallas::Base>) -> Vec<Value<bool>> {
    |   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
422 | /     construct_uint! {
423 | |         struct U256(4);
424 | |     }
    | |_____- may need to be moved as well
    = 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 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: 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 450 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, `impl` blocks should be written at the same level as their item

warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
   --> halo2_gadgets/src/ecc/chip/mul.rs:422:5
    |
422 | /     construct_uint! {
423 | |         struct U256(4);
424 | |     }
    | |     ^
    | |     |
    | |_____`&'a U256` is not local
    |       `Mul` is not local
    |
    = note: `impl` may be usable in bounds, etc. from outside the expression, which might e.g. make something constructible that previously wasn't, because it's still on a publicly-visible type
    = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl`
help: move the `impl` block outside of this function `decompose_for_scalar_mul`
   --> halo2_gadgets/src/ecc/chip/mul.rs:421:1
    |
421 |   fn decompose_for_scalar_mul(scalar: Value<&pallas::Base>) -> Vec<Value<bool>> {
    |   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
422 | /     construct_uint! {
423 | |         struct U256(4);
424 | |     }
    | |_____- may need to be moved as well
    = 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 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: 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 440 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, `impl` blocks should be written at the same level as their item

warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
   --> halo2_gadgets/src/ecc/chip/mul.rs:422:5
    |
422 | /     construct_uint! {
423 | |         struct U256(4);
424 | |     }
    | |     ^
    | |     |
    | |_____`&'a U256` is not local
    |       `Mul` is not local
    |
    = note: `impl` may be usable in bounds, etc. from outside the expression, which might e.g. make something constructible that previously wasn't, because it's still on a publicly-visible type
    = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl`
help: move the `impl` block outside of this function `decompose_for_scalar_mul`
   --> halo2_gadgets/src/ecc/chip/mul.rs:421:1
    |
421 |   fn decompose_for_scalar_mul(scalar: Value<&pallas::Base>) -> Vec<Value<bool>> {
    |   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
422 | /     construct_uint! {
423 | |         struct U256(4);
424 | |     }
    | |_____- may need to be moved as well
    = 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 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: 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 450 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, `impl` blocks should be written at the same level as their item

warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
   --> halo2_gadgets/src/ecc/chip/mul.rs:422:5
    |
422 | /     construct_uint! {
423 | |         struct U256(4);
424 | |     }
    | |     ^
    | |     |
    | |_____`&'a U256` is not local
    |       `Mul` is not local
    |
    = note: `impl` may be usable in bounds, etc. from outside the expression, which might e.g. make something constructible that previously wasn't, because it's still on a publicly-visible type
    = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl`
help: move the `impl` block outside of this function `decompose_for_scalar_mul`
   --> halo2_gadgets/src/ecc/chip/mul.rs:421:1
    |
421 |   fn decompose_for_scalar_mul(scalar: Value<&pallas::Base>) -> Vec<Value<bool>> {
    |   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
422 | /     construct_uint! {
423 | |         struct U256(4);
424 | |     }
    | |_____- may need to be moved as well
    = 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 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: 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 440 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, `impl` blocks should be written at the same level as their item

warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
   --> halo2_gadgets/src/ecc/chip/mul.rs:422:5
    |
422 | /     construct_uint! {
423 | |         struct U256(4);
424 | |     }
    | |     ^
    | |     |
    | |_____`&'a U256` is not local
    |       `Mul` is not local
    |
    = note: `impl` may be usable in bounds, etc. from outside the expression, which might e.g. make something constructible that previously wasn't, because it's still on a publicly-visible type
    = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl`
help: move the `impl` block outside of this function `decompose_for_scalar_mul`
   --> halo2_gadgets/src/ecc/chip/mul.rs:421:1
    |
421 |   fn decompose_for_scalar_mul(scalar: Value<&pallas::Base>) -> Vec<Value<bool>> {
    |   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
422 | /     construct_uint! {
423 | |         struct U256(4);
424 | |     }
    | |_____- may need to be moved as well
    = 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 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: 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 440 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, `impl` blocks should be written at the same level as their item

warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
   --> halo2_gadgets/src/ecc/chip/mul.rs:422:5
    |
422 | /     construct_uint! {
423 | |         struct U256(4);
424 | |     }
    | |     ^
    | |     |
    | |_____`&'a U256` is not local
    |       `Mul` is not local
    |
    = note: `impl` may be usable in bounds, etc. from outside the expression, which might e.g. make something constructible that previously wasn't, because it's still on a publicly-visible type
    = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl`
help: move the `impl` block outside of this function `decompose_for_scalar_mul`
   --> halo2_gadgets/src/ecc/chip/mul.rs:421:1
    |
421 |   fn decompose_for_scalar_mul(scalar: Value<&pallas::Base>) -> Vec<Value<bool>> {
    |   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
422 | /     construct_uint! {
423 | |         struct U256(4);
424 | |     }
    | |_____- may need to be moved as well
    = 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 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: 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 450 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, `impl` blocks should be written at the same level as their item

warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
   --> halo2_gadgets/src/ecc/chip/mul.rs:422:5
    |
422 | /     construct_uint! {
423 | |         struct U256(4);
424 | |     }
    | |     ^
    | |     |
    | |_____`&'a U256` is not local
    |       `Mul` is not local
    |
    = note: `impl` may be usable in bounds, etc. from outside the expression, which might e.g. make something constructible that previously wasn't, because it's still on a publicly-visible type
    = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl`
help: move the `impl` block outside of this function `decompose_for_scalar_mul`
   --> halo2_gadgets/src/ecc/chip/mul.rs:421:1
    |
421 |   fn decompose_for_scalar_mul(scalar: Value<&pallas::Base>) -> Vec<Value<bool>> {
    |   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
422 | /     construct_uint! {
423 | |         struct U256(4);
424 | |     }
    | |_____- may need to be moved as well
    = 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 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: 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)