summaryrefslogtreecommitdiff
path: root/scripts/generate_rust_analyzer.py
diff options
context:
space:
mode:
authorDanilo Krummrich <dakr@kernel.org>2025-03-08 01:49:52 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-03-13 15:01:47 +0300
commitec50a634be2b666b7cf9641da1e603553a7b1836 (patch)
treefcdd42162dd85ba6089c8b4821d7dd18403fc105 /scripts/generate_rust_analyzer.py
parent575f8f47112a2089af008c3a379d536a3f8694b6 (diff)
downloadlinux-ec50a634be2b666b7cf9641da1e603553a7b1836.tar.xz
rust: str: test: replace `alloc::format`
commit eb6f92cd3f755c179204ea1f933b07cf992892fd upstream. The current implementation of tests in str.rs use `format!` to format strings for comparison, which, internally, creates a new `String`. In order to prepare for getting rid of Rust's alloc crate, we have to cut this dependency. Instead, implement `format!` for `CString`. Note that for userspace tests, `Kmalloc`, which is backing `CString`'s memory, is just a type alias to `Cmalloc`. Reviewed-by: Alice Ryhl <aliceryhl@google.com> Reviewed-by: Benno Lossin <benno.lossin@proton.me> Reviewed-by: Gary Guo <gary@garyguo.net> Signed-off-by: Danilo Krummrich <dakr@kernel.org> Link: https://lore.kernel.org/r/20241004154149.93856-27-dakr@kernel.org Signed-off-by: Miguel Ojeda <ojeda@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'scripts/generate_rust_analyzer.py')
0 files changed, 0 insertions, 0 deletions