fn_to_numeric_cast incorrect suggestion #3896
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
L-suggestion
Lint: Improving, adding or fixing lint suggestions
Given the following code:
Clippy gives the following suggestion:
Applying this, results in a compilation error:
I'm not really sure if Clippy can suggest to change the return type of the function as well. Or maybe Clippy should mark this suggestion as
MaybeIncorrect
if the cast is the return value of the function?(Split off from #3630)
edit: Also make sure this is fixed for
fn_to_numeric_cast_with_truncation
The text was updated successfully, but these errors were encountered: