703bb98230
lint: change help for pointers to dyn types in FFI ### Context while playing around, I encountered the warning for dyn types in `extern "C"` functions, but even after that I assumed that a (rust) raw pointer could be interpreted in C ('s ABI) as a `void *`... to be fair part of why I ignored the warning is because I wanted to poke at the generated assembly, not make useful code. ### Example ```rust extern "C" fn caller(callee: *const dyn Fn(i32)->i32){ // -- snip -- } ``` old warning: ``` warning: `extern` fn uses type `dyn Fn(i32) -> i32`, which is not FFI-safe --> file/name.rs:42:19 | 42 | fn caller(callee: *const dyn Fn(i32)->i32) { | ^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe | = note: trait objects have no C equivalent = note: `#[warn(improper_ctypes_definitions)]` on by default ``` new warning: ``` warning: `extern` fn uses type `dyn Fn(i32) -> i32`, which is not FFI-safe --> file/name.rs:42:19 | 42 | fn caller(callee: *const dyn Fn(i32)->i32) -> (){ | ^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe | = note: this pointer to an unsized type contains metadata, which makes it incompatible with a C pointer = note: `#[warn(improper_ctypes_definitions)]` on by default ``` |
||
---|---|---|
.. | ||
assembly | ||
auxiliary | ||
codegen | ||
codegen-units | ||
coverage | ||
coverage-run-rustdoc | ||
crashes | ||
debuginfo | ||
incremental | ||
mir-opt | ||
pretty | ||
run-make | ||
rustdoc | ||
rustdoc-gui | ||
rustdoc-js | ||
rustdoc-js-std | ||
rustdoc-json | ||
rustdoc-ui | ||
ui | ||
ui-fulldeps | ||
COMPILER_TESTS.md |