Re: [PATCH] rust: disallow use of `CStr::as_ptr`
From: Gary Guo
Date: Wed Jan 21 2026 - 12:33:12 EST
On Wed Jan 21, 2026 at 5:04 PM GMT, Miguel Ojeda wrote:
> On Wed, Jan 21, 2026 at 5:58 PM Gary Guo <gary@xxxxxxxxxx> wrote:
>>
>> +#[expect(clippy::disallowed_methods, reason = "internal implementation")]
>
> Should we hide them too?
These are the methods that we want people to use? The "internal implementation"
means that the use of `CStr::as_char()` is the internal implementation detail of
`as_char_ptr` so it's okay. But nobody else should use it.
Best,
Gary
>
> Cheers,
> Miguel