Skip to content

feat: Add -Zhint-msrv flag#17106

Merged
joshtriplett merged 2 commits into
rust-lang:masterfrom
clubby789:lint-rust-version
Jun 26, 2026
Merged

feat: Add -Zhint-msrv flag#17106
joshtriplett merged 2 commits into
rust-lang:masterfrom
clubby789:lint-rust-version

Conversation

@clubby789

@clubby789 clubby789 commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Pass -Zhint-msrv={package.rust-version} to rustc when -Zhint-msrv is passed to Cargo, and the rust-version field is set.
This flag was implemented at rust-lang/rust#157707, renamed in rust-lang/rust#158134

Tracking issue: rust-lang/rust#157574

@rustbot rustbot added the A-build-execution Area: anything dealing with executing the compiler label Jun 16, 2026
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 16, 2026
@rustbot

rustbot commented Jun 16, 2026

Copy link
Copy Markdown
Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @weihanglo (or someone else) some time within the next two weeks.

Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (S-waiting-on-review and S-waiting-on-author) stays updated, invoking these commands when appropriate:

  • @rustbot author: the review is finished, PR author should check the comments and take action accordingly
  • @rustbot review: the author is ready for a review, this PR will be queued again in the reviewer's queue
Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: @ehuss, @epage, @weihanglo
  • @ehuss, @epage, @weihanglo expanded to ehuss, epage, weihanglo
  • Random selection from ehuss, epage, weihanglo

@clubby789
clubby789 force-pushed the lint-rust-version branch from 2486c65 to 701d42c Compare June 16, 2026 11:02
Comment thread src/cargo/core/compiler/mod.rs Outdated
@clubby789
clubby789 force-pushed the lint-rust-version branch from 701d42c to 96724af Compare June 16, 2026 12:11
@rustbot rustbot added the A-unstable Area: nightly unstable support label Jun 16, 2026
@clubby789 clubby789 changed the title feat: Set -Zlint-rust-version on nightly feat: Add -Zlint-rust-version flag Jun 16, 2026
Comment thread src/cargo/core/features.rs Outdated
@rustbot rustbot added the A-documenting-cargo-itself Area: Cargo's documentation label Jun 16, 2026
@clubby789

Copy link
Copy Markdown
Contributor Author

It might be good to wait on possible renaming (rust-lang/rust#157574 (comment)) before I push this forward

@clubby789
clubby789 marked this pull request as draft June 16, 2026 17:40
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 16, 2026
@weihanglo

Copy link
Copy Markdown
Member

Would love to see some tests when you get back on this :)

@rustbot

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-author Status: The marked PR is awaiting some action (such as code changes) from the PR author. label Jun 18, 2026
@clubby789
clubby789 force-pushed the lint-rust-version branch 3 times, most recently from cc59ffa to 24c8147 Compare June 22, 2026 18:49
@clubby789 clubby789 changed the title feat: Add -Zlint-rust-version flag feat: Add -Zhint-msrv flag Jun 22, 2026
@clubby789
clubby789 marked this pull request as ready for review June 22, 2026 18:50
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 22, 2026
@clubby789

Copy link
Copy Markdown
Contributor Author

I couldn't figure out how to test what args are passed, and right now no lints make use of this flag

@weihanglo

Copy link
Copy Markdown
Member

I couldn't figure out how to test what args are passed, and right now no lints make use of this flag

Passing --verbose. For example, this

@clubby789
clubby789 force-pushed the lint-rust-version branch from 24c8147 to a5d4476 Compare June 22, 2026 20:18
@clubby789
clubby789 force-pushed the lint-rust-version branch from a5d4476 to c77ef1a Compare June 22, 2026 20:30

@joshtriplett joshtriplett left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, and thank you for switching it over to be controlled by the -Z option.

View changes since this review

@joshtriplett
joshtriplett added this pull request to the merge queue Jun 25, 2026
Suggested-by: Ed Page <eopage@gmail.com>
@joshtriplett
joshtriplett removed this pull request from the merge queue due to a manual request Jun 25, 2026
@joshtriplett
joshtriplett enabled auto-merge June 25, 2026 21:33
@joshtriplett

joshtriplett commented Jun 25, 2026

Copy link
Copy Markdown
Member

Spurious CI failure. Worked on the second try.

@joshtriplett
joshtriplett added this pull request to the merge queue Jun 25, 2026
Merged via the queue into rust-lang:master with commit 92c4113 Jun 26, 2026
56 of 58 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 26, 2026
rust-bors Bot pushed a commit to rust-lang/rust that referenced this pull request Jun 27, 2026
Update cargo submodules

6 commits in a595d0da21f228b7fdae64d3d5c0e527ea66bb59..a335d47ff8036918d3d548dabd513dc0444096a9
2026-06-20 13:42:59 +0000 to 2026-06-26 20:39:41 +0000
- fix(diag): Remove sometimes-invalid removal suggestions  (rust-lang/cargo#17139)
- feat: Add `-Zhint-msrv` flag (rust-lang/cargo#17106)
- fix: LockManager use OS-aware flock shim (rust-lang/cargo#17128)
- fix: flaky test: sparse_blocking_count (rust-lang/cargo#17130)
- Add Solaris fcntl file locking (rust-lang/cargo#17110)
- fix(test): skip dwp uplift test without packed debuginfo (rust-lang/cargo#17127)

r? ghost
rust-bors Bot pushed a commit to rust-lang/rust that referenced this pull request Jun 27, 2026
Update cargo submodules

6 commits in a595d0da21f228b7fdae64d3d5c0e527ea66bb59..a335d47ff8036918d3d548dabd513dc0444096a9
2026-06-20 13:42:59 +0000 to 2026-06-26 20:39:41 +0000
- fix(diag): Remove sometimes-invalid removal suggestions  (rust-lang/cargo#17139)
- feat: Add `-Zhint-msrv` flag (rust-lang/cargo#17106)
- fix: LockManager use OS-aware flock shim (rust-lang/cargo#17128)
- fix: flaky test: sparse_blocking_count (rust-lang/cargo#17130)
- Add Solaris fcntl file locking (rust-lang/cargo#17110)
- fix(test): skip dwp uplift test without packed debuginfo (rust-lang/cargo#17127)

r? ghost
rust-bors Bot pushed a commit to rust-lang/rust that referenced this pull request Jun 27, 2026
Update cargo submodules

6 commits in a595d0da21f228b7fdae64d3d5c0e527ea66bb59..a335d47ff8036918d3d548dabd513dc0444096a9
2026-06-20 13:42:59 +0000 to 2026-06-26 20:39:41 +0000
- fix(diag): Remove sometimes-invalid removal suggestions  (rust-lang/cargo#17139)
- feat: Add `-Zhint-msrv` flag (rust-lang/cargo#17106)
- fix: LockManager use OS-aware flock shim (rust-lang/cargo#17128)
- fix: flaky test: sparse_blocking_count (rust-lang/cargo#17130)
- Add Solaris fcntl file locking (rust-lang/cargo#17110)
- fix(test): skip dwp uplift test without packed debuginfo (rust-lang/cargo#17127)

r? ghost
@rustbot rustbot added this to the 1.98.0 milestone Jun 27, 2026
faukah pushed a commit to faukah/miri that referenced this pull request Jun 28, 2026
Update cargo submodules

6 commits in a595d0da21f228b7fdae64d3d5c0e527ea66bb59..a335d47ff8036918d3d548dabd513dc0444096a9
2026-06-20 13:42:59 +0000 to 2026-06-26 20:39:41 +0000
- fix(diag): Remove sometimes-invalid removal suggestions  (rust-lang/cargo#17139)
- feat: Add `-Zhint-msrv` flag (rust-lang/cargo#17106)
- fix: LockManager use OS-aware flock shim (rust-lang/cargo#17128)
- fix: flaky test: sparse_blocking_count (rust-lang/cargo#17130)
- Add Solaris fcntl file locking (rust-lang/cargo#17110)
- fix(test): skip dwp uplift test without packed debuginfo (rust-lang/cargo#17127)

r? ghost
pull Bot pushed a commit to Kokoro2336/rust-analyzer that referenced this pull request Jun 29, 2026
Update cargo submodules

6 commits in a595d0da21f228b7fdae64d3d5c0e527ea66bb59..a335d47ff8036918d3d548dabd513dc0444096a9
2026-06-20 13:42:59 +0000 to 2026-06-26 20:39:41 +0000
- fix(diag): Remove sometimes-invalid removal suggestions  (rust-lang/cargo#17139)
- feat: Add `-Zhint-msrv` flag (rust-lang/cargo#17106)
- fix: LockManager use OS-aware flock shim (rust-lang/cargo#17128)
- fix: flaky test: sparse_blocking_count (rust-lang/cargo#17130)
- Add Solaris fcntl file locking (rust-lang/cargo#17110)
- fix(test): skip dwp uplift test without packed debuginfo (rust-lang/cargo#17127)

r? ghost
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-build-execution Area: anything dealing with executing the compiler A-documenting-cargo-itself Area: Cargo's documentation A-unstable Area: nightly unstable support S-waiting-on-author Status: The marked PR is awaiting some action (such as code changes) from the PR author.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants