Skip to content

improper_ctypes lint doesn't detect cross-crate un-ffi-safe structs #20098

Closed
@tomjakubowski

Description

@tomjakubowski

For example, it accepts this:

#![crate_type="lib"]
#![deny(improper_ctypes)]

extern "C" {
    pub fn foo(x: String);
}

Even though String is not FFI safe.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-FFIArea: Foreign function interface (FFI)A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions