IMPROPER_CTYPES in rustc_lint::types::improper_ctypes - Rust
Description: The `improper_ctypes` lint detects incorrect use of types in foreign modules.

Skip to main content

## IMPROPER_CTYPES

# Static IMPROPER_CTYPES

Source

    static IMPROPER_CTYPES: &Lint

Expand description

The `improper_ctypes` lint detects incorrect use of types in foreign modules.

#### §Example

    unsafe extern "C" {
        static STATIC: String;
    }

{{produces}}

#### §Explanation

The compiler has several checks to verify that types used in `extern` blocks are safe and follow certain rules to ensure proper compatibility with the foreign interfaces. This lint is issued when it detects a probable mistake in a definition. The lint usually should provide a description of the issue, along with possibly a hint on how to resolve it.