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

Timur Tabi
2026-01-14T19:26:45Z

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@vger.kernel.org
> Fixes: ce30d94e6855 ("rust: add `io::{Io, IoRaw}` base types")
> Reviewed-by: Daniel Almeida <daniel.almeida@collabora.com>
> Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>

Tested-by: Timur Tabi <ttabi@nvidia.com>

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.