Skip to content
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

rustdoc --passes=list doesn't show a deprecation warning #91713

Closed
jyn514 opened this issue Dec 9, 2021 · 2 comments · Fixed by #91717
Closed

rustdoc --passes=list doesn't show a deprecation warning #91713

jyn514 opened this issue Dec 9, 2021 · 2 comments · Fixed by #91717
Assignees
Labels
C-bug Category: This is a bug. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@jyn514
Copy link
Member

jyn514 commented Dec 9, 2021

I tried this command: rustdoc --passes=list

I expected to see this happen: rustdoc shows a warning, the way it does for any other value you pass to --passes:

$ rustdoc +nightly --passes check-invalid-html-tags
warning: the `passes` flag is deprecated
  |
  = note: see issue #44136 <https://github.com/rust-lang/rust/issues/44136> for more information

Instead, this happened: Rustdoc gives no warning and lists all passes.

Meta

rustdoc --version

rustdoc 1.58.0-nightly (e90c5fbbc 2021-11-12)
@jyn514 jyn514 added T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. C-bug Category: This is a bug. labels Dec 9, 2021
@jyn514 jyn514 added the E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. label Dec 9, 2021
@jyn514
Copy link
Member Author

jyn514 commented Dec 9, 2021

Mentoring instructions: Move this check

// check for deprecated options
check_deprecated_options(matches, &diag);

earlier to before --passes=list is processed:
if matches.opt_strs("passes") == ["list"] {
println!("Available passes for running rustdoc:");
for pass in passes::PASSES {
println!("{:>20} - {}", pass.name, pass.description);
}
println!("\nDefault passes for rustdoc:");
for p in passes::DEFAULT_PASSES {
print!("{:>20}", p.pass.name);
println_condition(p.condition);
}
if nightly_options::match_is_nightly_build(matches) {
println!("\nPasses run with `--show-coverage`:");
for p in passes::COVERAGE_PASSES {
print!("{:>20}", p.pass.name);
println_condition(p.condition);
}
}
fn println_condition(condition: Condition) {
use Condition::*;
match condition {
Always => println!(),
WhenDocumentPrivate => println!(" (when --document-private-items)"),
WhenNotDocumentPrivate => println!(" (when not --document-private-items)"),
WhenNotDocumentHidden => println!(" (when not --document-hidden-items)"),
}
}
return Err(0);
}

@jyn514 jyn514 added the E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion. label Dec 9, 2021
@inashivb
Copy link
Contributor

inashivb commented Dec 9, 2021

@rustbot claim

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Dec 9, 2021
Add deprecation warning for --passes

Issue rust-lang#91713 mentored by `@jyn514`
@camelid camelid linked a pull request Dec 9, 2021 that will close this issue
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Dec 10, 2021
Add deprecation warning for --passes

Issue rust-lang#91713 mentored by ``@jyn514``
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Dec 11, 2021
Add deprecation warning for --passes

Issue rust-lang#91713 mentored by ```@jyn514```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants