cargo icon indicating copy to clipboard operation
cargo copied to clipboard

feat(lint): imprecise_version_requirements

Open weihanglo opened this issue 1 week ago • 1 comments

What does this PR try to resolve?

Add a new cargo::imprecise_version_requirements lint: Only check if dependency has a single caret requirement. All other requirements (multiple, tilde, wildcard) are not linted by this rule.

Fixes https://github.com/rust-lang/cargo/issues/15577

How to test and review this PR?

  • Find a good lint name
  • Find a proper lint level (currently set to allow because this may get people a lot of warnings)
  • Should we lint beyond caret requirements?
  • (maybe for follow-up) Should Cargo suggest a minimal bound?

weihanglo avatar Dec 01 '25 21:12 weihanglo