rust: doctests: Mark generated rustdoc kunit tests extern "C" by sulix · Pull Request #968 · Rust-for-Linux/linux (original) (raw)
The generated rustdoc tests were marked no_mangle, but not extern "C". Since these are called from C by KUnit, they should use the C ABI.
This is a follow up to #967 and #966.
I'm away on a different computer than normal, so it's possible I've missed something: rustfmt passed on the rustdoc_test_gen.rs
file itself (since we're just changing the string), but the generated doctests_kernel_generated.rs
has lots of formatting issues. I elected not to try to fix those (they probably depend on the length of the test name), and quite a few predate this patch.