Closed
Description
Ever since its introduction, the FFI safety lint has accepted MyOption<Box<T>>
as FFI safe even if MyOption
is not the "official" Option
type from libcore. This was originally done because "being sound but slightly incomplete is acceptable". However, it doesn't quite reflect today's approaches any more, and IMO the lint should be adjusted to match the documented guarantees -- which AFAIK only cover specifically Option
, and not all "Option-like" types.
Cc @rust-lang/opsem @workingjubilee @Noratrieb
Metadata
Metadata
Assignees
Labels
Area: Foreign function interface (FFI)Area: Lints (warnings about flaws in source code) such as unused_mut.Category: This is a bug.Lint: improper_ctypesRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the language team, which will review and decide on the PR/issue.