From: sashiko-bot@kernel.org
To: "Alice Ryhl" <aliceryhl@google.com>
Cc: ojeda@kernel.org, linux-pci@vger.kernel.org,
dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] rust: device_id: rename IdTable::as_ptr to as_raw_id_table()
Date: Thu, 02 Jul 2026 12:35:29 +0000 [thread overview]
Message-ID: <20260702123530.ACC7B1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260702-idtable-rename-asptr-v1-1-e0927273c71a@google.com>
> The current name of `as_ptr` is very generic, and if you attempt to
> invoke `foo.as_ptr()` on a type for which this method is missing, then
> an error along these lines will be printed:
>
> error[E0599]: no method named `as_ptr` found for reference `&DmaBuf` in the current scope
> --> linux/rust/kernel/dma_buf/buf.rs:54:38
> |
> 54 | ptr::eq(self.as_ptr(), other.as_ptr())
> | ^^^^^^ method not found in `&DmaBuf`
> |
> = help: items from traits can only be used if the trait is implemented and in scope
> note: `device_id::IdTable` defines an item `as_ptr`, perhaps you need to implement it
> --> linux/rust/kernel/device_id.rs:165:1
> |
> 165 | pub trait IdTable<T: RawDeviceId, U> {
> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
> Suggesting the IdTable trait when an as_ptr() method is missing is not
> useful. Renaming it to `as_raw_id_table` makes the method name unique to
> this trait and avoids these bad suggestions.
>
> Assisted-by: Antigravity:Gemini
> Signed-off-by: Alice Ryhl <aliceryhl@google.com>
Sashiko has reviewed this patch and found no issues. It looks great!
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260702-idtable-rename-asptr-v1-1-e0927273c71a@google.com?part=1
next prev parent reply other threads:[~2026-07-02 12:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-02 12:30 [PATCH] rust: device_id: rename IdTable::as_ptr to as_raw_id_table() Alice Ryhl
2026-07-02 12:35 ` sashiko-bot [this message]
2026-07-02 13:48 ` Gary Guo
2026-07-02 13:59 ` Alice Ryhl
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=20260702123530.ACC7B1F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=aliceryhl@google.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-pci@vger.kernel.org \
--cc=ojeda@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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