Re: [PATCH v5 6/7] rust: Add read_poll_timeout functions

From: Miguel Ojeda
Date: Thu Nov 07 2024 - 08:07:20 EST


On Thu, Nov 7, 2024 at 1:50 PM Rasmus Villemoes <ravi@xxxxxxxxx> wrote:
>
> Would it be too much to hope for either a compiler flag or simply
> default behaviour for having the backing, static store of the file!()
> &str being guaranteed to be followed by a nul character? (Of course that
> nul should not be counted in the slice's length). That would in general
> increase interop with C code.

Definitely -- please see the "`c_stringify!`, `c_concat!`, `c_file!`
macros" item in:

https://github.com/Rust-for-Linux/linux/issues/514

Relatedly, for `Location`, there is "C string equivalents
(nul-terminated) for `core::panic::Location`.", with this ACP:

https://github.com/rust-lang/libs-team/issues/466

Cheers,
Miguel