[len_zero
] suggestion causing compilation fail when macros involved
#11992
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
I-suggestion-causes-error
Issue: The suggestions provided by this Lint cause an ICE/error when applied
Uh oh!
There was an error while loading. Please reload this page.
Summary
Somewhat related to PR: #11991
The issue was that the given suggestion span was inside of a macro, rather than the macro callsite. See reproduce code.
I think the lint should skip warnings when the code was expanded from macro.
Lint Name
len_zero
Reproducer
I tried this code:
I saw this happen:
I expected to see this happen:
no warnings, because we might not be able to change the content inside of macros.
Version
Additional Labels
@rustbot label +I-suggestion-causes-error
The text was updated successfully, but these errors were encountered: