Skip to content

Commit 1701699

Browse files
ojedaintel-lab-lkp
authored andcommitted
rust: init: use explicit ABI to clean warning in future compilers
Starting with Rust 1.86.0 (currently in nightly, to be released on 2025-04-03), the `missing_abi` lint is warn-by-default [1]: error: extern declarations without an explicit ABI are deprecated --> rust/doctests_kernel_generated.rs:3158:1 | 3158 | extern { | ^^^^^^ help: explicitly specify the C ABI: `extern "C"` | = note: `-D missing-abi` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(missing_abi)]` Thus clean it up. Link: rust-lang/rust#132397 [1] Signed-off-by: Miguel Ojeda <[email protected]>
1 parent 100ceb4 commit 1701699

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: rust/kernel/init.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -854,7 +854,7 @@ pub unsafe trait PinInit<T: ?Sized, E = Infallible>: Sized {
854854
/// use kernel::{types::Opaque, init::pin_init_from_closure};
855855
/// #[repr(C)]
856856
/// struct RawFoo([u8; 16]);
857-
/// extern {
857+
/// extern "C" {
858858
/// fn init_foo(_: *mut RawFoo);
859859
/// }
860860
///

0 commit comments

Comments
 (0)