IMPROPER_CTYPES_DEFINITIONS in rustc_lint::types::improper_ctypes - Rust
Description: The `improper_ctypes_definitions` lint detects incorrect use of `extern` function definitions.

Skip to main content

## IMPROPER_CTYPES_DEFINITIONS

# Static IMPROPER_CTYPES_DEFINITIONS

Source

    static IMPROPER_CTYPES_DEFINITIONS: &Lint

Expand description

The `improper_ctypes_definitions` lint detects incorrect use of `extern` function definitions.

#### §Example

    pub extern "C" fn str_type(p: &str) { }

{{produces}}

#### §Explanation

There are many parameter and return types that may be specified in an `extern` function that are not compatible with the given ABI. This lint is an alert that these types should not be used. The lint usually should provide a description of the issue, along with possibly a hint on how to resolve it.