I'm attempting to add an assert_ffi_safe! macro to static_assertions by creating an extern "C" block with a function that references the input types and marking it with #[forbid(improper_ctypes)] (see nvzqz/static-assertions#31). However, while the macro works correctly if used within the same crate, it results in false positives when used externally. This is evidenced by compile_fail doc tests passing.
I imagine that rustc lints are disabled when calling into a macro that is not defined within the calling crate so that they don't become a nuisance to consumers who have no control over the code within the macro. This is a case where ensuring that lints work across crate boundaries would be beneficial.
I'm attempting to add an
assert_ffi_safe!macro tostatic_assertionsby creating anextern "C"block with a function that references the input types and marking it with#[forbid(improper_ctypes)](see nvzqz/static-assertions#31). However, while the macro works correctly if used within the same crate, it results in false positives when used externally. This is evidenced bycompile_faildoc tests passing.I imagine that
rustclints are disabled when calling into a macro that is not defined within the calling crate so that they don't become a nuisance to consumers who have no control over the code within the macro. This is a case where ensuring that lints work across crate boundaries would be beneficial.