clashing_extern_declarations misses clashes of same-sized members of structs #73872
Labels
A-lints
Area: Lints (warnings about flaws in source code) such as unused_mut.
C-bug
Category: This is a bug.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
The
clashing_extern_declarations
lint currently incorrectly misses clashing extern fn declarations if they clash on a struct with same-sized members.In this example here:
(Playground)
The declaration of
origin
should clash, becausea::Point3
andb::Point3
have members of different type. However, the lint currently misses that the return type oforigin
is inconsistently declared, even though ani32
andf32
clash is warned on its own:Note that this false negative only occurs for same-sized members -- the lint correctly fires for members of different sizes:
This issue has been assigned to @jumbatm via this comment.
The text was updated successfully, but these errors were encountered: