False positive in collapsible_span_lint_calls
internal lint
#7698
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
Lint name:
collapsible_span_lint_calls
I tried this code:
Clippy suggests to collapse this into
span_lint_and_help()
. However, this is not possible becausespan_lint_and_then()
takesS: Into<MultiSpan>
whilespan_lint_and_help()
only takesSpan
.The issue can be easily fixed by either
(1) checking the type of the span and suppress the lint if it is not
Span
(2) modifying the signature of
span_lint_and_help()
to acceptInto<MultiSpan>
Meta
Rust version (
rustc -Vv
):The text was updated successfully, but these errors were encountered: