replace_consts false positive when using integer constant as part of range in match #4969
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
cargo clippy -V
:clippy 0.0.212 (69f99e7 2019-12-14)
Playground link: https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=401f208640cdf49300acf4ef902f01ee
Minimal example:
If I try replacing
std::u32::MAX
withu32::max_value()
, I get a syntax error from rust. Wrapping in parenthesis or curly braces doesn't make it valid.I don't get a warning if it's not part of a range.
The text was updated successfully, but these errors were encountered: