Re: [PATCH 1/5] rust: iov: add iov_iter abstractions for ITER_SOURCE

Miguel Ojeda
2025-03-22T21:00:39Z

On Wed, Mar 19, 2025 at 7:54 PM Andreas Hindborg <a.hindborg@kernel.org> wrote:
>
> Don't we have some kind of `build_assert` macro to do this? If not,
> maybe we should.

`static_assert!` is the one (`build_assert!` is the other one, which
is a heavier hammer that should only be used if really needed).

Though our `static_assert!` does not have support for an (optional)
message -- we could add that, perhaps as a good first issue. In this
case it is not a big deal either way.

> How did you arrive at this conclusion? In the discussions with Ralph on

Ralf?

Cheers,
Miguel