Re: [PATCH] rust: fix formatting expressions

From: Andreas Hindborg

Date: Wed Jan 14 2026 - 06:29:08 EST


"Tamir Duberstein" <tamird@xxxxxxxxxx> writes:

> From: Tamir Duberstein <tamird@xxxxxxxxx>
>
> Allow usage like `pr_info!("one + 1 = {}", one + 1)` to compile by
> ensuring that a reference is taken to the entire expression.
>
> Fixes: c5cf01ba8dfe ("rust: support formatting of foreign types")
> Reported-by: Janne Grunau <j@xxxxxxxxxx>
> Closes: https://rust-for-linux.zulipchat.com/#narrow/channel/288089-General/topic/Custom.20formatting/near/566219493
> ---
> Signed-off-by: Tamir Duberstein <tamird@xxxxxxxxx>


Tested-by: Andreas Hindborg <a.hindborg@xxxxxxxxxx>


Best regards,
Andreas Hindborg