rust: init: use explicit ABI to clean warning in future compilers
Subsystems (2)
Miguel Ojeda
maintainerPATCH 1/1 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.
--- rust/kernel/init.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
rust/kernel/init.rs +1 -1
@@ -854,7 +854,7 @@ pub unsafe trait PinInit<T: ?Sized, E = Infallible>: Sized {/// use kernel::{types::Opaque, init::pin_init_from_closure}; /// #[repr(C)] /// struct RawFoo([u8; 16]); -/// extern { +/// extern "C" { /// fn init_foo(_: *mut RawFoo); /// } ///
base-commit: 100ceb4817a2ac650e29f107cf97161ce3e2289a
Signature · 1 line
2.48.1
Quoted 13 lines · Miguel Ojeda
Starting with Rust 1.86.0 (currently in nightly, to be released on 2025-04-03), the
missing_abilint 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-abiimplied by-D warnings= help: to override-D warningsadd#[allow(missing_abi)]
Quoted 4 lines
Thus clean it up.
Signed-off-by Miguel Ojeda <[email protected]>
Cc: <[email protected]> # Needed in 6.12.y only (Rust is pinned in older LTSs).
And while there was nothing wrong back then with the commit, as usual:
Fixes: 7f8977a7fe6d ("rust: init: add `{pin_}chain` functions to{Pin}Init<T, E>")
Cheers,
Miguel
Quoted 13 lines · Miguel Ojeda
Starting with Rust 1.86.0 (currently in nightly, to be released on 2025-04-03), the
missing_abilint 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-abiimplied by-D warnings= help: to override-D warningsadd#[allow(missing_abi)]
Quoted 4 lines
Thus clean it up.
Signed-off-by Miguel Ojeda <[email protected]>
Quoted 12 lines · Miguel Ojeda
Starting with Rust 1.86.0 (currently in nightly, to be released on 2025-04-03), the
missing_abilint 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-abiimplied by-D warnings= help: to override-D warningsadd#[allow(missing_abi)]
Quoted 4 lines
Thus clean it up.
Signed-off-by Miguel Ojeda <[email protected]>
Quoted 21 lines
--- rust/kernel/init.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)rust/kernel/init.rs +1
-1@@ -854,7 +854,7 @@ pub unsafe trait PinInit<T: ?Sized, E = Infallible>: Sized {/// use kernel::{types::Opaque, init::pin_init_from_closure}; /// #[repr(C)] /// struct RawFoo([u8; 16]); -/// extern { +/// extern "C" { /// fn init_foo(_: *mut RawFoo); /// } /// base-commit:
100ceb4817a2ac650e29f107cf97161ce3e2289aSignature · 1 line
2.48.1
Quoted 12 lines · On Tue, 21 Jan 2025 21:09:34 +0100 Miguel Ojeda <[email protected]> wrote:
Starting with Rust 1.86.0 (currently in nightly, to be released on 2025-04-03), the
missing_abilint 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-abiimplied by-D warnings= help: to override-D warningsadd#[allow(missing_abi)]
Quoted 4 lines
Thus clean it up.
Signed-off-by Miguel Ojeda <[email protected]>
Quoted 19 lines
--- rust/kernel/init.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)rust/kernel/init.rs +1
-1@@ -854,7 +854,7 @@ pub unsafe trait PinInit<T: ?Sized, E = Infallible>: Sized {/// use kernel::{types::Opaque, init::pin_init_from_closure}; /// #[repr(C)] /// struct RawFoo([u8; 16]); -/// extern { +/// extern "C" { /// fn init_foo(_: *mut RawFoo); /// } /// base-commit:
100ceb4817a2ac650e29f107cf97161ce3e2289a
Miguel Ojeda
AppliedQuoted 13 lines · Miguel Ojeda
Starting with Rust 1.86.0 (currently in nightly, to be released on 2025-04-03), the
missing_abilint 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-abiimplied by-D warnings= help: to override-D warningsadd#[allow(missing_abi)]
Quoted 4 lines
Thus clean it up.
Signed-off-by Miguel Ojeda <[email protected]>
Applied to rust-fixes -- thanks everyone!
[ Added 6.13.y to Cc: stable tag. - Miguel ]
Cheers,
Miguel