mark deprecated option as deprecated in rustc_session to remove copypasta and small refactor by klensy · Pull Request #135126 · rust-lang/rust (original) (raw)

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 andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation15 Commits1 Checks6 Files changed

Conversation

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})

klensy

This marks deprecated options as deprecated via flag in options table in rustc_session, which removes copypasted deprecation text from rustc_driver_impl.

This also adds warning for deprecated -C ar option, which didn't emitted any warnings before.
Makes inline_threshold [UNTRACKED], as it do nothing.
Adds few tests.

See individual commits.

@rustbot

r? @cjgillot

rustbot has assigned @cjgillot.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review

Status: Awaiting review from the assignee but also interested parties.

T-compiler

Relevant to the compiler team, which will review and decide on the PR/issue.

labels

Jan 5, 2025

klensy

@@ -1128,10 +1128,6 @@ pub fn describe_flag_categories(early_dcx: &EarlyDiagCtxt, matches: &Matches) ->
early_dcx.early_warn("the `-Cno-stack-check` flag is deprecated and does nothing");
}
if cg_flags.iter().any(|x

Choose a reason for hiding this comment

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

Previously this have ability to warn for any possible flags with inline-threshold prefix, but not now.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

jieyouxu

jieyouxu

Choose a reason for hiding this comment

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

Thanks, just one test nit

@jieyouxu jieyouxu added S-waiting-on-author

Status: This is awaiting some action (such as code changes or more information) from the author.

and removed S-waiting-on-review

Status: Awaiting review from the assignee but also interested parties.

labels

Jan 6, 2025

jieyouxu

Choose a reason for hiding this comment

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

Thanks. Can you squash the commits into one? You can r=me after PR CI is green afterwards.

@jieyouxu

@bors

✌️ @klensy, you can now approve this pull request!

If @jieyouxu told you to "r=me" after making some further change, please make that change, then do @bors r=@jieyouxu

@klensy

inline_threshold mark deprecated

no-stack-check

print deprecation message for -Car too

inline_threshold deprecated and do nothing: make in untracked

make OptionDesc struct from tuple

@klensy

@bors

📌 Commit 37f2631 has been approved by jieyouxu

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors

Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

and removed S-waiting-on-author

Status: This is awaiting some action (such as code changes or more information) from the author.

labels

Jan 6, 2025

jhpratt added a commit to jhpratt/rust that referenced this pull request

Jan 7, 2025

@jhpratt

…r=jieyouxu

mark deprecated option as deprecated in rustc_session to remove copypasta and small refactor

This marks deprecated options as deprecated via flag in options table in rustc_session, which removes copypasted deprecation text from rustc_driver_impl.

This also adds warning for deprecated -C ar option, which didn't emitted any warnings before. Makes inline_threshold [UNTRACKED], as it do nothing. Adds few tests.

See individual commits.

This was referenced

Jan 7, 2025

bors added a commit to rust-lang-ci/rust that referenced this pull request

Jan 7, 2025

@bors

Rollup of 9 pull requests

Successful merges:

r? @ghost @rustbot modify labels: rollup

rust-timer added a commit to rust-lang-ci/rust that referenced this pull request

Jan 7, 2025

@rust-timer

Rollup merge of rust-lang#135126 - klensy:deprecated-and-do-nothing, r=jieyouxu

mark deprecated option as deprecated in rustc_session to remove copypasta and small refactor

This marks deprecated options as deprecated via flag in options table in rustc_session, which removes copypasted deprecation text from rustc_driver_impl.

This also adds warning for deprecated -C ar option, which didn't emitted any warnings before. Makes inline_threshold [UNTRACKED], as it do nothing. Adds few tests.

See individual commits.

Labels

S-waiting-on-bors

Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

T-compiler

Relevant to the compiler team, which will review and decide on the PR/issue.