manual_is_ascii_check
suggests incorrect type
#13913
Labels
C-bug
Category: Clippy is not doing the correct thing
I-suggestion-causes-error
Issue: The suggestions provided by this Lint cause an ICE/error when applied
Summary
The manual_is_ascii_check lint suggests an incompatible type, leading to a compilation error. The lambda requires
|c: &char|
, but clippy inserts|c: char|
instead.I think this is related to #11988.
Reproducer
I tried this code:
I expected to see this happen:
.take_while(|c| c.is_ascii_digit())
.take_while(|c: &char| c.is_ascii_digit())
Instead, this happened:
.take_while(|c: char| c.is_ascii_digit())
Version
Additional Labels
@rustbot label I-suggestion-causes-error
The text was updated successfully, but these errors were encountered: