Skip to content

Commit

Permalink
Merge pull request Rust-for-Linux#968 from sulix/rust_doctest_extern
Browse files Browse the repository at this point in the history
rust: doctests: Mark generated rustdoc kunit tests extern "C"
  • Loading branch information
ojeda authored Feb 16, 2023
2 parents 9c0096c + d4dca5d commit 1a12514
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/rustdoc_test_gen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ fn main() {
rust_tests,
r#"/// Generated `{name}` KUnit test case from a Rust documentation test.
#[no_mangle]
pub fn {name}(__kunit_test: *mut kernel::bindings::kunit) {{
pub extern "C" fn {name}(__kunit_test: *mut kernel::bindings::kunit) {{
/// Provides mutual exclusion (see `# Implementation` notes).
static __KUNIT_TEST_MUTEX: kernel::sync::smutex::Mutex<()> =
kernel::sync::smutex::Mutex::new(());
Expand Down

0 comments on commit 1a12514

Please sign in to comment.