Re: [PATCH v3 1/6] rust: add warn_on_err macro
From: Alexandre Courbot
Date: Thu Apr 30 2026 - 11:28:38 EST
On Sun Apr 26, 2026 at 10:30 PM JST, Miguel Ojeda wrote:
> On Wed, Apr 22, 2026 at 3:41 PM Alexandre Courbot <acourbot@xxxxxxxxxx> wrote:
>>
>> While we already have the `warn_on` macro, a common usage pattern in
>> Rust is to check whether a `Result` is an error. Add a helper macro that
>> allows this.
>>
>> Reviewed-by: Eliot Courtney <ecourtney@xxxxxxxxxx>
>> Signed-off-by: Alexandre Courbot <acourbot@xxxxxxxxxx>
>
> I saw the discussion with Gary in v2 -- not sure if you are still
> putting this in. If so, and assuming Gary is OK with it, I guess it is
> fine as-is for now, but we should probably create at least a (good
> first?) issue:
>
> Acked-by: Miguel Ojeda <ojeda@xxxxxxxxxx>
Thanks - I will send a separate patch for this shortly, and take it
alongside the Nova unload series if it can be reviewed quickly.
>
> Not sure about Sashiko's report -- it may be nice to make the macro
> more transparent, even if it would be rare to use it with expressions
> where it would matter.
Gary's proposal [1] looked good, so I think we can use just that.
[1] https://lore.kernel.org/all/DI1IQE7MDV4O.5B2DVIXMX2OT@xxxxxxxxxxx/