-
Notifications
You must be signed in to change notification settings - Fork 13.8k
Open
Labels
A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.A-macrosArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..)C-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.T-langRelevant to the language teamRelevant to the language team
Description
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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.A-macrosArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..)C-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.T-langRelevant to the language teamRelevant to the language team