qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Cc: Zhao Liu <zhao1.liu@intel.com>,
	Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Subject: [PULL 09/29] rust/qemu-macros: Fix Clippy's complaints about lambda parameter naming
Date: Wed, 24 Sep 2025 11:28:29 +0200	[thread overview]
Message-ID: <20250924092850.42047-10-pbonzini@redhat.com> (raw)
In-Reply-To: <20250924092850.42047-1-pbonzini@redhat.com>

From: Zhao Liu <zhao1.liu@intel.com>

error: `rename` shadows a previous, unrelated binding
   --> qemu-macros/src/lib.rs:265:14
    |
265 |             |rename| -> Result<proc_macro2::TokenStream, Error> {
    |              ^^^^^^
    |
note: previous binding is here
   --> qemu-macros/src/lib.rs:245:30
    |
245 |         let DeviceProperty { rename, defval } = prop;
    |                              ^^^^^^
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#shadow_unrelated
    = note: requested on the command line with `-D clippy::shadow-unrelated`

Rename the lambda parameter to "prop_rename" to fix the above clippy
error.

Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Signed-off-by: Zhao Liu <zhao1.liu@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Link: https://lore.kernel.org/r/20250920160520.3699591-4-zhao1.liu@intel.com
---
 rust/qemu-macros/src/lib.rs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/rust/qemu-macros/src/lib.rs b/rust/qemu-macros/src/lib.rs
index 7ab18061776..37e1b723bd5 100644
--- a/rust/qemu-macros/src/lib.rs
+++ b/rust/qemu-macros/src/lib.rs
@@ -242,8 +242,8 @@ macro_rules! str_to_c_str {
 
         let prop_name = rename.map_or_else(
             || str_to_c_str!(field_name.to_string(), field_name.span()),
-            |rename| -> Result<proc_macro2::TokenStream, Error> {
-                match rename {
+            |prop_rename| -> Result<proc_macro2::TokenStream, Error> {
+                match prop_rename {
                     DevicePropertyName::CStr(cstr_lit) => Ok(quote! { #cstr_lit }),
                     DevicePropertyName::Str(str_lit) => {
                         str_to_c_str!(str_lit.value(), str_lit.span())
-- 
2.51.0



  parent reply	other threads:[~2025-09-24  9:34 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-24  9:28 [PULL 00/29] Rust, QOM, docs changes for 2025-09-24 Paolo Bonzini
2025-09-24  9:28 ` [PULL 01/29] docs: use the pyvenv version of Meson Paolo Bonzini
2025-09-24  9:28 ` [PULL 02/29] rust: build: add back common and util tests Paolo Bonzini
2025-09-24  9:28 ` [PULL 03/29] rust: vmstate: use "cast()" instead of "as" Paolo Bonzini
2025-09-24  9:28 ` [PULL 04/29] rust: build: remove "protocol: rust: from doctests Paolo Bonzini
2025-09-24  9:28 ` [PULL 05/29] subprojects: add attrs crate Paolo Bonzini
2025-09-24  9:28 ` [PULL 06/29] rust: qemu-macros: switch #[property] parsing to use combinators Paolo Bonzini
2025-09-24  9:28 ` [PULL 07/29] subprojects: Update .gitignore for proc-macro2 and syn Paolo Bonzini
2025-09-24  9:28 ` [PULL 08/29] subprojects: Ignore .wraplock file generated by meson v1.9.0 Paolo Bonzini
2025-09-24  9:28 ` Paolo Bonzini [this message]
2025-09-24  9:28 ` [PULL 10/29] rust/common/uninit: Fix Clippy's complaints about lifetime Paolo Bonzini
2025-09-24  9:28 ` [PULL 11/29] rust/qdev: use addr_of! in QDevProp Paolo Bonzini
2025-09-24  9:28 ` [PULL 12/29] rust/qdev: Refine the documentation for QDevProp trait Paolo Bonzini
2025-09-24  9:28 ` [PULL 13/29] rust/qdev: Support property info for more common types Paolo Bonzini
2025-09-24  9:28 ` [PULL 14/29] rust/qdev: Support bit property in #property macro Paolo Bonzini
2025-09-24  9:28 ` [PULL 15/29] rust/qdev: Test bit property for #property Paolo Bonzini
2025-09-24  9:28 ` [PULL 16/29] rust/hpet: Clean up type mismatch for num_timers property Paolo Bonzini
2025-09-24  9:28 ` [PULL 17/29] rust/hpet: Convert qdev properties to #property macro Paolo Bonzini
2025-09-24  9:28 ` [PULL 18/29] rust/qdev: Drop declare_properties & define_property macros Paolo Bonzini
2025-09-24  9:28 ` [PULL 19/29] linux-user: avoid -Werror=int-in-bool-context Paolo Bonzini
2025-09-24  9:28 ` [PULL 20/29] docs/devel: Do not unparent in instance_finalize() Paolo Bonzini
2025-09-24  9:28 ` [PULL 21/29] vfio/pci: " Paolo Bonzini
2025-09-24  9:28 ` [PULL 22/29] hw/core/register: " Paolo Bonzini
2025-09-24  9:28 ` [PULL 23/29] hv-balloon: " Paolo Bonzini
2025-09-24  9:28 ` [PULL 24/29] hw/sd/sdhci: " Paolo Bonzini
2025-09-24  9:28 ` [PULL 25/29] vfio: " Paolo Bonzini
2025-09-24  9:28 ` [PULL 26/29] hw/xen: " Paolo Bonzini
2025-09-24  9:28 ` [PULL 27/29] docs/code-provenance: clarify scope very early Paolo Bonzini
2025-09-24  9:28 ` [PULL 28/29] docs/code-provenance: make the exception process more prominent Paolo Bonzini
2025-09-24  9:28 ` [PULL 29/29] docs/code-provenance: AI exceptions are in addition to DCO Paolo Bonzini
2025-09-24 21:16 ` [PULL 00/29] Rust, QOM, docs changes for 2025-09-24 Richard Henderson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250924092850.42047-10-pbonzini@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=manos.pitsidianakis@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=zhao1.liu@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).