Re: [PATCH v3 2/7] rust: io: always inline functions using build_assert with arguments

From: Timur Tabi

Date: Wed Jan 14 2026 - 14:26:45 EST


On Mon, 2025-12-08 at 11:47 +0900, Alexandre Courbot wrote:
> `build_assert` relies on the compiler to optimize out its error path.
> Functions using it with its arguments must thus always be inlined,
> otherwise the error path of `build_assert` might not be optimized out,
> triggering a build error.
>
> Cc: stable@xxxxxxxxxxxxxxx
> Fixes: ce30d94e6855 ("rust: add `io::{Io, IoRaw}` base types")
> Reviewed-by: Daniel Almeida <daniel.almeida@xxxxxxxxxxxxx>
> Signed-off-by: Alexandre Courbot <acourbot@xxxxxxxxxx>

Tested-by: Timur Tabi <ttabi@xxxxxxxxxx>

Without patch 2/7, my Turing patchset will fail to compile with CLIPPY. So please merge this
patchset, or at least just this patch, soon.