Skip to content

Add lint to detect when the rust-version field is not defined #14064

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
sorairolake opened this issue Jan 23, 2025 · 1 comment
Closed

Add lint to detect when the rust-version field is not defined #14064

sorairolake opened this issue Jan 23, 2025 · 1 comment
Labels
A-lint Area: New lints

Comments

@sorairolake
Copy link

sorairolake commented Jan 23, 2025

What it does

Checks to see if the rust-version field is defined in Cargo.toml.

Advantage

The MSRV-aware resolver takes this field into account when picking dependencies if it is defined. If this field is defined, the toil is reduced for maintainers to support older toolchains by not needing to manually select older versions for each dependency.

Drawbacks

The MSRV-aware resolver has been stabilized since Rust 1.84.0.

Example

[package]
# ...

Could be written as:

[package]
# ...
rust-version = "1.56"
@Manishearth
Copy link
Member

Closing, see discussion in #14071

@Manishearth Manishearth closed this as not planned Won't fix, can't repro, duplicate, stale Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-lint Area: New lints
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants