What it does
This lint triggers on usage of legacy integral constants and functions, such as:
- std::i32::MAX
- u64::max_value()
Advantage
Enforce a consistent style across the ecosystem.
This lint should probably be placed into the clippy::style group.
Drawbacks
Older projects will experience some churn, but this should be trivially auto-fixable in most cases.
T-libs-api opposes deprecating this outright so a clippy lint is the next best thing.
Example
Could be written using the associated constant as: