diff options
| author | Gary Guo <[email protected]> | 2022-11-10 16:41:31 +0000 |
|---|---|---|
| committer | Miguel Ojeda <[email protected]> | 2022-12-04 00:59:15 +0000 |
| commit | b18cb00e5a8a1182ef491b770ea1a3dab081dc5b (patch) | |
| tree | f5ba092679cebe1498a6f359260dd6cc7b0a3632 /scripts/generate_rust_analyzer.py | |
| parent | rust: str: add `CStr` unit tests (diff) | |
| download | kernel-b18cb00e5a8a1182ef491b770ea1a3dab081dc5b.tar.gz kernel-b18cb00e5a8a1182ef491b770ea1a3dab081dc5b.zip | |
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 <[email protected]>
Signed-off-by: Alex Gaynor <[email protected]>
Signed-off-by: Gary Guo <[email protected]>
[Reworded, adapted for upstream and applied latest changes]
Signed-off-by: Miguel Ojeda <[email protected]>
Diffstat (limited to 'scripts/generate_rust_analyzer.py')
0 files changed, 0 insertions, 0 deletions
