Skip to content

Commit 1a12514

Browse files
authored
Merge pull request #968 from sulix/rust_doctest_extern
rust: doctests: Mark generated rustdoc kunit tests extern "C"
2 parents 9c0096c + d4dca5d commit 1a12514

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/rustdoc_test_gen.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ fn main() {
3131
rust_tests,
3232
r#"/// Generated `{name}` KUnit test case from a Rust documentation test.
3333
#[no_mangle]
34-
pub fn {name}(__kunit_test: *mut kernel::bindings::kunit) {{
34+
pub extern "C" fn {name}(__kunit_test: *mut kernel::bindings::kunit) {{
3535
/// Provides mutual exclusion (see `# Implementation` notes).
3636
static __KUNIT_TEST_MUTEX: kernel::sync::smutex::Mutex<()> =
3737
kernel::sync::smutex::Mutex::new(());

0 commit comments

Comments
 (0)