Re: [PATCH v3] rust: Mark all from() for Error functions inline

From: Miguel Ojeda

Date: Fri Mar 27 2026 - 08:02:54 EST


On Thu, Mar 26, 2026 at 3:04 AM <alistair23@xxxxxxxxx> wrote:
>
> From: Alistair Francis <alistair.francis@xxxxxxx>
>
> Mark all of the existing
>
> impl From<...> for Error {
> fn from(err: ...) -> Self {
> ...
> }
> }
>
> functions as `#[inline]`
>
> There was a recent request [1] to inline the simple from() Error
> functions to avoid the function call overhead.
>
> This patch inlines all of the functions (except for the pin-initi and
> syn) and converts one existing `inline(always)` to `inline` to match
> the styles.
>
> Link: https://lore.kernel.org/all/CAH5fLggOnVguVErjySphX__vs3iYAo4O+J6hrXW546JrWSq5ZA@xxxxxxxxxxxxxx/ [1]
> Signed-off-by: Alistair Francis <alistair.francis@xxxxxxx>
> Acked-by: Danilo Krummrich <dakr@xxxxxxxxxx>

Applied to `rust-next` -- thanks everyone!

[ Dropped `projection.rs` since it is in another tree and already marked
as `inline(always)` and reworded accordingly. Changed Link tag to
Gary's original message and added Suggested-by. - Miguel ]

Alistair: please take a look at the reword in case you disagree. Thanks!

Cheers,
Miguel