Thread (12 messages) 12 messages, 3 authors, 2025-06-02

Re: [PATCH v11 4/5] rust: replace `kernel::c_str!` with C-Strings

From: Tamir Duberstein <hidden>
Date: 2025-06-02 13:55:24
Also in: dri-devel, linux-block, linux-devicetree, linux-kselftest, linux-pci, lkml, llvm, nouveau, rust-for-linux

On Mon, Jun 2, 2025 at 4:45 AM Alice Ryhl [off-list ref] wrote:
On Fri, May 30, 2025 at 08:27:45AM -0400, Tamir Duberstein wrote:
quoted
C-String literals were added in Rust 1.77. Replace instances of
`kernel::c_str!` with C-String literals where possible and rename
`kernel::c_str!` to `str_to_cstr!` to clarify its intended use.

Closes: https://github.com/Rust-for-Linux/linux/issues/1075
Signed-off-by: Tamir Duberstein <redacted>
quoted
-/// Creates a new [`CStr`] from a string literal.
+/// Creates a static C string wrapper at compile time.
A C string *wrapper*? What do you mean? I would drop the word "wrapper"
here.
Yeah, I don't remember where this wording came from. I'll change it to
be mostly the same as it was: "Creates a new [`CStr`] at compile
time.".
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help