qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Zhao Liu <zhao1.liu@intel.com>
Cc: qemu-devel <qemu-devel@nongnu.org>, qemu-rust@nongnu.org
Subject: Re: [PATCH 2/2] rust: include rust_version in Cargo.toml
Date: Thu, 6 Feb 2025 23:31:16 +0100	[thread overview]
Message-ID: <CABgObfaKLUmbRwgvm0AkeAdJG5BCeQKO2TWfXz_1g1zcPAY6gQ@mail.gmail.com> (raw)
In-Reply-To: <Z6SWrSZ1HSyIc52q@intel.com>

[-- Attachment #1: Type: text/plain, Size: 973 bytes --]

Il gio 6 feb 2025, 11:42 Zhao Liu <zhao1.liu@intel.com> ha scritto:

> > diff --git a/rust/hw/char/pl011/src/device_class.rs
> b/rust/hw/char/pl011/src/device_class.rs
> > index 8a157a663fb..dbef93f6cb3 100644
> > --- a/rust/hw/char/pl011/src/device_class.rs
> > +++ b/rust/hw/char/pl011/src/device_class.rs
> > @@ -12,7 +12,6 @@
> >
> >  use crate::device::{PL011Registers, PL011State};
> >
> > -#[allow(clippy::missing_const_for_fn)]
>
> It seems like a rebase nit since the commit 7d0520398f7f ("rust: prefer
> NonNull::new to assertions"), which is not worth an extra commit either.
>

It's not; adding rust_version let's Clippy know that this function cannot
be const in all supported versions of the standard library.

Paolo

>  extern "C" fn pl011_clock_needed(opaque: *mut c_void) -> bool {
> >      let state = NonNull::new(opaque).unwrap().cast::<PL011State>();
> >      unsafe { state.as_ref().migrate_clock }
>
> Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
>
>

[-- Attachment #2: Type: text/html, Size: 2162 bytes --]

      reply	other threads:[~2025-02-06 22:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-29  8:37 [PATCH 0/2] rust: small cleanups to Cargo.toml files Paolo Bonzini
2025-01-29  8:37 ` [PATCH 1/2] rust: remove unnecessary Cargo.toml metadata Paolo Bonzini
2025-02-06 10:42   ` Zhao Liu
2025-01-29  8:37 ` [PATCH 2/2] rust: include rust_version in Cargo.toml Paolo Bonzini
2025-02-06 11:02   ` Zhao Liu
2025-02-06 22:31     ` Paolo Bonzini [this message]

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=CABgObfaKLUmbRwgvm0AkeAdJG5BCeQKO2TWfXz_1g1zcPAY6gQ@mail.gmail.com \
    --to=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-rust@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).