Re: [PATCH RESEND v13 1/2] rust: fmt: fix {:p} printing stack addresses

Alice Ryhl <[email protected]> Wed, 5 Aug 2026 08:15:15 +0000
Newsgroups org.kernel.vger.rust-for-linux
Message-ID <[email protected]>
On Mon, Jul 06, 2026 at 01:18:43PM +0800, Ke Sun wrote:
> The `impl_fmt_adapter_forward!` macro forwards `Pointer` for
> `Adapter<T>` by destructuring `self` into a local `t`, causing `{:p}`
> to print the address of that temporary stack variable rather than the
> actual pointer.
> 
> Remove `Pointer` from the macro and provide a manual impl for
> `Adapter<&T>` that passes `self.0` directly.
> 
> Signed-off-by: Ke Sun <[email protected]>

Reviewed-by: Alice Ryhl <[email protected]>