[PATCH v9 6/6] rust: enable `clippy::ref_as_ptr` lint
Boqun Feng
boqun.feng at gmail.com
Wed Apr 16 17:58:49 UTC 2025
On Wed, Apr 16, 2025 at 01:53:34PM -0400, Tamir Duberstein wrote:
> On Wed, Apr 16, 2025 at 1:51 PM Boqun Feng <boqun.feng at gmail.com> wrote:
> >
> > On Wed, Apr 16, 2025 at 01:36:10PM -0400, Tamir Duberstein wrote:
> > > In Rust 1.78.0, Clippy introduced the `ref_as_ptr` lint [1]:
> > >
> > > > Using `as` casts may result in silently changing mutability or type.
> > >
> > > While this doesn't eliminate unchecked `as` conversions, it makes such
> > > conversions easier to scrutinize. It also has the slight benefit of
> > > removing a degree of freedom on which to bikeshed. Thus apply the
> > > changes and enable the lint -- no functional change intended.
> > >
> > > Link: https://rust-lang.github.io/rust-clippy/master/index.html#ref_as_ptr [1]
> > > Suggested-by: Benno Lossin <benno.lossin at proton.me>
> > > Link: https://lore.kernel.org/all/D8PGG7NTWB6U.3SS3A5LN4XWMN@proton.me/
> > > Reviewed-by: Benno Lossin <benno.lossin at proton.me>
> > > Signed-off-by: Tamir Duberstein <tamird at gmail.com>
> >
> > Reviewed-by: Boqun Feng <boqun.feng at gmail.com>
> >
> > Thanks!
>
> Thank you! I updated the earlier patches as well.
Yeah, those look good to me in a quick look, I do plan to take a deep
look and provide Reviewed-bys later.
Regards,
Boqun
More information about the dri-devel
mailing list