From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0683ECCA476 for ; Fri, 10 Oct 2025 14:15:08 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1v7DtW-0007jB-GL; Fri, 10 Oct 2025 10:14:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1v7DtS-0007b8-6I for qemu-rust@nongnu.org; Fri, 10 Oct 2025 10:14:51 -0400 Received: from mail-ed1-x529.google.com ([2a00:1450:4864:20::529]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1v7DtG-0003gi-O2 for qemu-rust@nongnu.org; Fri, 10 Oct 2025 10:14:48 -0400 Received: by mail-ed1-x529.google.com with SMTP id 4fb4d7f45d1cf-63163a6556bso4235668a12.1 for ; Fri, 10 Oct 2025 07:14:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1760105672; x=1760710472; darn=nongnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=058w4CnQoaWYCrsWvckRBoaK3UCOTYkXq/JMaiKx6Lg=; b=BBMPmbvUsXMQBxgQ3CZRmfdgWl007a4jmPejpm3TMbG2OJy/nBckxvFbUoMa9NpoLn kNEEH2v2fubStlevCdowbot3eY7cY3FZyp/97rPENR2caXAtoUjI+oWCLxiRT+WYqoCb itAROP2Ej+3GSQ/oGXYvhDfZgTabvAR3jBuG0iPYKv3vTDxoPwGKydCtu/HOkZYti/Rj i8bu1i3MgFdIZgAlcZmm10DPAyTfFKYV8k4ybNnHa1GXP+ShgDjQPUW1JdV3Yvuu81xy zrDw0yLJO+sGmPJhXdnZwfpBtEHXtkO3mOSdXM2kOZBEcDkpZh+heuv1okJ7xngk0J3L kgYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1760105672; x=1760710472; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=058w4CnQoaWYCrsWvckRBoaK3UCOTYkXq/JMaiKx6Lg=; b=SziQq028jZ4laDHXHAwd6fwg2AiuS9T00YDNVwamzDkmtm3x8n7yzQydBDuIDob6bP eULUqhYzYxiqTtij0PSTFEGJutlsMsIL/WV1zI4kyH5MQEuq57bWLm4xHt1a9fs5FPjo Fi8wTKWPrgc3J+ea7GPPansnx+yZhwHQmnJ15gwzU65yiLrIT58u1Irf8xJf8dl8RiYR sq2twp4SPfpkFcz1DYopqy9bOdApRyJgu7TqxXBLIjlEOJFXuto4HjFTueBwU4KC7SKV 9B0VQhvjgCcw2KYYblgsJXNxm2Rmli9Bm8bi63jzRLM9XsM2uQYiaX2pFxBuCVKGdWPt ypmg== X-Forwarded-Encrypted: i=1; AJvYcCVOdxg9jvlh2TWSoFkBi1g5SMZ1f/1bea9SWjgnoz+ExENlfiymCUKDiQ1ZNTmIwFCncgFMJ/L7T0M=@nongnu.org X-Gm-Message-State: AOJu0YypgMie26f4SSvIpkxjaFrmZTaqgXj+yoDZssu3kbMEhwbygKIK qtzXpFbG0uJWF9HkBI1ZbmPZMZleIIi+WtDH8ATFOba5pjaM2bXNWbEjdOFSYxgRTM/dfMhu0Gb KVbHQ+sIl31L88kheaX+CDEeEL0NjSHf/w/zgVCXvRg== X-Gm-Gg: ASbGncvpujiyg089azD5xm4FFWUSurdMw7JXaQ4cfD/koTmkNHz5se7FkB019gbhAuW 0C3GQ6ao1hI77RygFqMgedxLhnAK6+9YVJF38QXrlnCVm4THMz0GTL9fJ7YyU6VfqrpzYs1W/Oq XzSxQwHeb++VmO4qKG7r8sVrjsqtrP1TpkfeTx41Scbh/zyFHgQg5zMXKUVv4XbvtLK6dba7ZcJ a38NMWivvkLjsf6IHr411I3p1z6+wLTi9CgIA== X-Google-Smtp-Source: AGHT+IGxtlECE4+UHktRUMy+A//VOGAnjBHD2SX5viARvXdAzr32tIoT43FoqQrmT5PrGe95cp7q14jQB4EmZ3Ck21U= X-Received: by 2002:a05:6402:254c:b0:62a:a4f0:7e4f with SMTP id 4fb4d7f45d1cf-639d5c52babmr10087997a12.29.1760105671989; Fri, 10 Oct 2025 07:14:31 -0700 (PDT) MIME-Version: 1.0 References: <20251009211208.643222-1-pbonzini@redhat.com> <0766dc6c-6cab-4f56-a8ab-c573aff15421@redhat.com> In-Reply-To: <0766dc6c-6cab-4f56-a8ab-c573aff15421@redhat.com> From: Manos Pitsidianakis Date: Fri, 10 Oct 2025 17:14:06 +0300 X-Gm-Features: AS18NWAPD9S-wVx_UgSXe0blu_FRPrLgrbxk0hk695JasrsM-S9HRdjcGWkRVig Message-ID: Subject: Re: [PATCH] rust: temporarily disable double_parens check To: Paolo Bonzini Cc: qemu-devel@nongnu.org, qemu-rust@nongnu.org, Richard Henderson Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2a00:1450:4864:20::529; envelope-from=manos.pitsidianakis@linaro.org; helo=mail-ed1-x529.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-rust@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: QEMU Rust-related patches and discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-rust-bounces+qemu-rust=archiver.kernel.org@nongnu.org Sender: qemu-rust-bounces+qemu-rust=archiver.kernel.org@nongnu.org On Fri, Oct 10, 2025 at 5:12=E2=80=AFPM Paolo Bonzini = wrote: > > On 10/10/25 14:23, Manos Pitsidianakis wrote: > > On Fri, Oct 10, 2025 at 12:12=E2=80=AFAM Paolo Bonzini wrote: > >> > >> It is showing in the output of the bits! macro and not easy to fix the= re > >> (at least not without making the macro more complex). Disable it for > >> now. > >> > >> Link: https://github.com/rust-lang/rust-clippy/issues/15852 > >> Reported-by: Richard Henderson > >> Signed-off-by: Paolo Bonzini > >> --- > > > > How about putting it in the macro expansion instead of globally allowin= g it? > > > > macro_rules! foo { > > ($a:expr, $b:expr, $c:expr, $d:expr) =3D> { > > #[allow(clippy::double_parens)] > > InterruptMask(((($a.union($b).union($c).union($d))).into_bits(= )) as u32) > > } > > } > > Can you do it for procedural macros as well? Of course! > > > Why is the double parenthesis needed here by the way? It's a method cha= in > It's just how the macro works, occasionally generating double > parentheses keeps the parser simple. Makes sense.