Skip to content

unnecessary parenthesis on macro call #16023

@jxs

Description

@jxs

Summary

Hi, we started getting unnecessary parenthesis on a macro call with clippy beta which seem like a bug:

warning: unnecessary parentheses
  --> protocols/kad/src/kbucket/key.rs:37:1
   |
37 | / construct_uint! {
38 | |     /// 256-bit unsigned integer.
39 | |     pub struct U256(4);
40 | | }
   | |_^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/beta/index.html#double_parens
   = note: `#[warn(clippy::double_parens)]` on by default
   = note: this warning originates in the macro `$crate::construct_uint` which comes from the expansion of the macro `construct_uint` (in Nightly builds, run with -Z macro-backtrace for more info)

warning: `libp2p-kad` (lib) generated 1 warning

Lint Name

clippy::double_parens

Reproducer

I tried
cargo +beta clippy --all-features --all-targets
on https://github.com/libp2p/rust-libp2p/tree/master/protocols/kad

Version

cargo 1.92.0-beta.2 (344c4567c 2025-10-21)
release: 1.92.0-beta.2
commit-hash: 344c4567c634a25837e3c3476aac08af84cf9203
commit-date: 2025-10-21
host: x86_64-unknown-linux-gnu
libgit2: 1.9.1 (sys:0.20.2 vendored)
libcurl: 8.15.0-DEV (sys:0.4.83+curl-8.15.0 vendored ssl:OpenSSL/3.5.4)

Additional Labels

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: Clippy is not doing the correct thingI-false-positiveIssue: The lint was triggered on code it shouldn't have

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions