about summary refs log tree commit diff
path: root/compiler
diff options
context:
space:
mode:
authorYuki Okushi <huyuumi.dev@gmail.com>2021-03-07 10:41:13 +0900
committerGitHub <noreply@github.com>2021-03-07 10:41:13 +0900
commitf3218dfa57105c66fd964c6df3942c36e475b39c (patch)
treea1fe08d726a1c798fee6f3d6672dbb95b2ca4a23 /compiler
parent817e58f38deee4eb0bbb1402873f5e4ea0ea0ec9 (diff)
parentd5c300b1f2e9a6f7f05b2fa51ca2b4d011d289f4 (diff)
downloadrust-f3218dfa57105c66fd964c6df3942c36e475b39c.tar.gz
rust-f3218dfa57105c66fd964c6df3942c36e475b39c.zip
Rollup merge of #82651 - jyn514:rustdoc-warnings, r=GuillaumeGomez
Cleanup rustdoc warnings

## Clean up error reporting for deprecated passes

Using `error!` here goes all the way back to the original commit, https://github.com/rust-lang/rust/pull/8540. I don't see any reason to use logging; rustdoc should use diagnostics wherever possible. See https://github.com/rust-lang/rust/pull/81932#issuecomment-785291244 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 https://github.com/rust-lang/rust/pull/52194. I don't see any particular reason not to use diagnostics here, I think it was just missed in https://github.com/rust-lang/rust/pull/50541.
Diffstat (limited to 'compiler')
-rw-r--r--compiler/rustc_passes/src/check_attr.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/rustc_passes/src/check_attr.rs b/compiler/rustc_passes/src/check_attr.rs
index ed971951b0f..6cc649c1180 100644
--- a/compiler/rustc_passes/src/check_attr.rs
+++ b/compiler/rustc_passes/src/check_attr.rs
@@ -576,7 +576,8 @@ impl CheckAttrVisitor<'tcx> {
                             sym::masked,
                             sym::no_default_passes, // deprecated
                             sym::no_inline,
-                            sym::passes, // deprecated
+                            sym::passes,  // deprecated
+                            sym::plugins, // removed, but rustdoc warns about it itself
                             sym::primitive,
                             sym::spotlight,
                             sym::test,