Stream: t-lang/wg-unsafe-code-guidelines

Topic: improper C types and indirection


Daniel Henry-Mantilla (Nov 12 2019 at 17:34, on Zulip):

Hey, I've updated rustc and compiling some FFI code now fires many improper_ctypes lints, which I find awesome and set up to #[deny()] by default. However, AFAIK, when T : Sized, a raw pointer or a rust reference to T is #[repr(C)], independently of T so being. And yet the lint triggers on this case, which leads to having to have a #[allow(improper_ctypes)] added in such cases, which undermines the point of the lint, imho.

rkruppe (Nov 12 2019 at 18:02, on Zulip):

See also #66220

Last update: Dec 12 2019 at 01:10UTC