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

Cleanup rustdoc warnings #82651

Merged
merged 2 commits into from
Mar 7, 2021
Merged

Cleanup rustdoc warnings #82651

merged 2 commits into from
Mar 7, 2021

Conversation

jyn514
Copy link
Member

@jyn514 jyn514 commented Mar 1, 2021

Clean up error reporting for deprecated passes

Using error! here goes all the way back to the original commit, #8540. I don't see any reason to use logging; rustdoc should use diagnostics wherever possible. See #81932 (comment) for further context.

  • Use spans for deprecated attributes
  • Use a proper diagnostic for unknown passes, instead of error logging
  • Add tests for unknown passes
  • Improve some wording in diagnostics

Report that doc(plugins) doesn't work using diagnostics instead of eprintln!

This also adds a test for the output.

This was added in #52194. I don't see any particular reason not to use diagnostics here, I think it was just missed in #50541.

@jyn514 jyn514 added T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. A-diagnostics Area: Messages for errors, warnings, and lints labels Mar 1, 2021
@rust-highfive
Copy link
Collaborator

r? @GuillaumeGomez

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 1, 2021
@GuillaumeGomez
Copy link
Member

Thanks! r=me with green CI

@rust-log-analyzer

This comment has been minimized.

@jyn514
Copy link
Member Author

jyn514 commented Mar 1, 2021

@bors r=GuillaumeGomez

@bors
Copy link
Contributor

bors commented Mar 1, 2021

📌 Commit 960d4fb3aca9215eae7a04a4c7f4483c3a66bcc7 has been approved by GuillaumeGomez

@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-review Status: Awaiting review from the assignee but also interested parties. labels Mar 1, 2021
@bors

This comment has been minimized.

@bors bors 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-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Mar 2, 2021
- Use spans for deprecated attributes
- Use a proper diagnostic for unknown passes, instead of error logging
- Add tests for unknown passes
- Improve some wording in diagnostics
@jyn514
Copy link
Member Author

jyn514 commented Mar 2, 2021

Note that this now adds sym::plugins as a known doc attribute; it was missing before.

@jyn514 jyn514 added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Mar 2, 2021
@rust-log-analyzer

This comment has been minimized.

…`println!`

This also adds a test for the output and fixes `rustc_attr` to properly
know that `plugins` is a valid attribute.
@jyn514
Copy link
Member Author

jyn514 commented Mar 3, 2021

ping @GuillaumeGomez - I changed this a little since your last review, you may want to take another look. In particular this adds sym::plugins to the list of rustdoc attributes (it was missed in #82662).

@GuillaumeGomez
Copy link
Member

Thanks!

@bors: r+

@bors
Copy link
Contributor

bors commented Mar 5, 2021

📌 Commit d5c300b has been approved by GuillaumeGomez

@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-review Status: Awaiting review from the assignee but also interested parties. labels Mar 5, 2021
JohnTitor added a commit to JohnTitor/rust that referenced this pull request Mar 6, 2021
…eGomez

Cleanup rustdoc warnings

## Clean up error reporting for deprecated passes

Using `error!` here goes all the way back to the original commit, rust-lang#8540. I don't see any reason to use logging; rustdoc should use diagnostics wherever possible. See rust-lang#81932 (comment) for further context.

- Use spans for deprecated attributes
- Use a proper diagnostic for unknown passes, instead of error logging
- Add tests for unknown passes
- Improve some wording in diagnostics

##  Report that `doc(plugins)` doesn't work using diagnostics instead of `eprintln!`

This also adds a test for the output.

This was added in rust-lang#52194. I don't see any particular reason not to use diagnostics here, I think it was just missed in rust-lang#50541.
JohnTitor added a commit to JohnTitor/rust that referenced this pull request Mar 6, 2021
…eGomez

Cleanup rustdoc warnings

## Clean up error reporting for deprecated passes

Using `error!` here goes all the way back to the original commit, rust-lang#8540. I don't see any reason to use logging; rustdoc should use diagnostics wherever possible. See rust-lang#81932 (comment) for further context.

- Use spans for deprecated attributes
- Use a proper diagnostic for unknown passes, instead of error logging
- Add tests for unknown passes
- Improve some wording in diagnostics

##  Report that `doc(plugins)` doesn't work using diagnostics instead of `eprintln!`

This also adds a test for the output.

This was added in rust-lang#52194. I don't see any particular reason not to use diagnostics here, I think it was just missed in rust-lang#50541.
m-ou-se added a commit to m-ou-se/rust that referenced this pull request Mar 6, 2021
…eGomez

Cleanup rustdoc warnings

## Clean up error reporting for deprecated passes

Using `error!` here goes all the way back to the original commit, rust-lang#8540. I don't see any reason to use logging; rustdoc should use diagnostics wherever possible. See rust-lang#81932 (comment) for further context.

- Use spans for deprecated attributes
- Use a proper diagnostic for unknown passes, instead of error logging
- Add tests for unknown passes
- Improve some wording in diagnostics

##  Report that `doc(plugins)` doesn't work using diagnostics instead of `eprintln!`

This also adds a test for the output.

This was added in rust-lang#52194. I don't see any particular reason not to use diagnostics here, I think it was just missed in rust-lang#50541.
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Mar 6, 2021
…eGomez

Cleanup rustdoc warnings

## Clean up error reporting for deprecated passes

Using `error!` here goes all the way back to the original commit, rust-lang#8540. I don't see any reason to use logging; rustdoc should use diagnostics wherever possible. See rust-lang#81932 (comment) for further context.

- Use spans for deprecated attributes
- Use a proper diagnostic for unknown passes, instead of error logging
- Add tests for unknown passes
- Improve some wording in diagnostics

##  Report that `doc(plugins)` doesn't work using diagnostics instead of `eprintln!`

This also adds a test for the output.

This was added in rust-lang#52194. I don't see any particular reason not to use diagnostics here, I think it was just missed in rust-lang#50541.
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 7, 2021
Rollup of 13 pull requests

Successful merges:

 - rust-lang#77916 (Change built-in kernel targets to be os = none throughout)
 - rust-lang#82130 (Make some Option, Result methods unstably const)
 - rust-lang#82292 (Prevent specialized ZipImpl from calling `__iterator_get_unchecked` twice with the same index)
 - rust-lang#82402 (Remove RefCell around `module_trait_cache`)
 - rust-lang#82592 (Improve transmute docs with further clarifications)
 - rust-lang#82651 (Cleanup rustdoc warnings)
 - rust-lang#82720 (Fix diagnostic suggests adding type `[type error]`)
 - rust-lang#82751 (improve offset_from docs)
 - rust-lang#82793 (Move some tests to more suitable subdirs)
 - rust-lang#82803 (rustdoc: Add an unstable option to print all unversioned files)
 - rust-lang#82808 (Sync rustc_codegen_cranelift)
 - rust-lang#82822 (Fix typo)
 - rust-lang#82837 (tweak MaybeUninit docs)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit f3218df into rust-lang:master Mar 7, 2021
@rustbot rustbot added this to the 1.52.0 milestone Mar 7, 2021
@jyn514 jyn514 deleted the rustdoc-warnings branch March 7, 2021 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-diagnostics Area: Messages for errors, warnings, and lints S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants