Commit 0df88b7
committed
rust: allow
Starting with Rust 1.98.0 (expected 2026-08-20), Rust is introducing
a new deny-by-default lint which checks the signature of items whose
symbol name is a runtime symbol expected by `core`:
error: invalid definition of the runtime `strlen` symbol used by the standard library
--> rust/uapi/uapi_generated.rs:13998:5
|
13998 | pub fn strlen(s: *const ffi::c_char) -> usize;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: expected `unsafe extern "C" fn(*const i8) -> usize`
found `unsafe extern "C" fn(*const u8) -> usize`
= help: either fix the signature or remove any attributes like `#[unsafe(no_mangle)]`, `#[unsafe(export_name = "strlen")]`, or `#[link_name = "strlen"]`
= note: `#[deny(invalid_runtime_symbol_definitions)]` on by default
error: invalid definition of the runtime `strlen` symbol used by the standard library
--> rust/bindings/bindings_generated.rs:19877:5
|
19877 | pub fn strlen(s: *const ffi::c_char) -> usize;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: expected `unsafe extern "C" fn(*const i8) -> usize`
found `unsafe extern "C" fn(*const u8) -> usize`
= help: either fix the signature or remove any attributes like `#[unsafe(no_mangle)]`, `#[unsafe(export_name = "strlen")]`, or `#[link_name = "strlen"]`
= note: `#[deny(invalid_runtime_symbol_definitions)]` on by default
Thus `allow` the lint in `bindings` and `uapi`.
Link: rust-lang/rust#155521 [1]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>invalid_runtime_symbol_definitions lint for Rust >= 1.981 parent 40bc558 commit 0df88b7
2 files changed
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| |||
0 commit comments