summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorGary Guo <gary@garyguo.net>2022-11-10 19:41:31 +0300
committerMiguel Ojeda <ojeda@kernel.org>2022-12-04 03:59:15 +0300
commitb18cb00e5a8a1182ef491b770ea1a3dab081dc5b (patch)
treef5ba092679cebe1498a6f359260dd6cc7b0a3632 /scripts
parent985f1f09bf5bf8cbcb43e58a2320de2a5054be4c (diff)
downloadlinux-b18cb00e5a8a1182ef491b770ea1a3dab081dc5b.tar.xz
rust: str: add `c_str!` macro
Add `c_str!`, which is a convenience macro that creates a new `CStr` from a string literal. It is designed to be similar to a `str` in usage, and it is usable in const contexts, for instance: const X: &CStr = c_str!("Example"); Co-developed-by: Alex Gaynor <alex.gaynor@gmail.com> Signed-off-by: Alex Gaynor <alex.gaynor@gmail.com> Signed-off-by: Gary Guo <gary@garyguo.net> [Reworded, adapted for upstream and applied latest changes] Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions