Contents of expanded derive
macro are being checked and errors generated
#14063
Labels
C-bug
Category: Clippy is not doing the correct thing
I-false-positive
Issue: The lint was triggered on code it shouldn't have
Summary
I believe this might be related to
A user has already commented on that ticket that the fix did not solve the issue for them.
Here's what this looks like:
This screenshot is from an IDE, so you can see the code and the resulting lint error at the same time.
Here's what that looks like in the terminal:
Lint Name
#[deny(clippy::ref_option)]
Reproducer
I tried this code:
I saw this happen:
I expected to see this happen:
No error, since the lint is being violated within the code generated by a derive macro. I'd expect there to be a flag to enable checking in an expanded macro (useful for macro authoring). But I'd not expect macro expanded code to be checked by default, as those errors can only be fixed during the development of the macro and only by someone with rights to publish the macro.
Version
Additional Labels
No response
The text was updated successfully, but these errors were encountered: