diff options
| author | bors <bors@rust-lang.org> | 2021-12-20 04:21:12 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-12-20 04:21:12 +0000 |
| commit | 940a97a91023d1817b33d0ababc985793c9ed780 (patch) | |
| tree | 6b1d8e84ebd946c786e6656ce26e60a27a86ad6f /src/test | |
| parent | ed7a2068432b62880bca89cd69546682a2e192cd (diff) | |
| parent | 02b94b7922d6938da3bde07cedd5f02823a72d97 (diff) | |
Auto merge of #91900 - pitaj:fix-91714, r=jyn514
rustdoc: make `--passes` and `--no-defaults` have no effect Fixes #91714 One potential issue is that currently there is no stable way to achieve `--document-hidden-items`. This affects test `issue-15347`. I also had to modify the tests `issue-42875` and `no-compiler-export`. Regardless of combinations of `--document-hidden-items` and `--document-private-items`, I was unable to get these to pass without the modifications. I left behind a comment noting the change.
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/rustdoc-ui/deprecated-attrs.rs | 7 | ||||
| -rw-r--r-- | src/test/rustdoc-ui/deprecated-attrs.stderr | 20 | ||||
| -rw-r--r-- | src/test/rustdoc-ui/issue-91713.rs | 2 | ||||
| -rw-r--r-- | src/test/rustdoc-ui/issue-91713.stderr | 3 | ||||
| -rw-r--r-- | src/test/rustdoc/inline_local/glob-extern-document-private-items.rs (renamed from src/test/rustdoc/inline_local/glob-extern-no-defaults.rs) | 2 | ||||
| -rw-r--r-- | src/test/rustdoc/inline_local/glob-private-document-private-items.rs (renamed from src/test/rustdoc/inline_local/glob-private-no-defaults.rs) | 2 | ||||
| -rw-r--r-- | src/test/rustdoc/issue-15347.rs | 2 | ||||
| -rw-r--r-- | src/test/rustdoc/issue-42875.rs | 13 | ||||
| -rw-r--r-- | src/test/rustdoc/no-compiler-reexport.rs | 6 |
9 files changed, 18 insertions, 39 deletions
diff --git a/src/test/rustdoc-ui/deprecated-attrs.rs b/src/test/rustdoc-ui/deprecated-attrs.rs index 5febc5eb9cd..4f6a14fc2c2 100644 --- a/src/test/rustdoc-ui/deprecated-attrs.rs +++ b/src/test/rustdoc-ui/deprecated-attrs.rs @@ -1,16 +1,15 @@ // check-pass // compile-flags: --passes unknown-pass -// error-pattern: ignoring unknown pass `unknown-pass` +// error-pattern: the `passes` flag no longer functions #![doc(no_default_passes)] //~^ WARNING attribute is deprecated //~| NOTE see issue #44136 -//~| HELP use `#![doc(document_private_items)]` +//~| HELP no longer functions; you may want to use `#![doc(document_private_items)]` #![doc(passes = "collapse-docs unindent-comments")] //~^ WARNING attribute is deprecated //~| NOTE see issue #44136 -//~| WARNING ignoring unknown pass -//~| NOTE `collapse-docs` pass was removed +//~| HELP no longer functions; you may want to use `#![doc(document_private_items)]` #![doc(plugins = "xxx")] //~^ WARNING attribute is deprecated //~| NOTE see issue #44136 diff --git a/src/test/rustdoc-ui/deprecated-attrs.stderr b/src/test/rustdoc-ui/deprecated-attrs.stderr index b855cedf522..45b20ce70ef 100644 --- a/src/test/rustdoc-ui/deprecated-attrs.stderr +++ b/src/test/rustdoc-ui/deprecated-attrs.stderr @@ -1,8 +1,7 @@ -warning: the `passes` flag is deprecated +warning: the `passes` flag no longer functions | = note: see issue #44136 <https://github.com/rust-lang/rust/issues/44136> for more information - -warning: ignoring unknown pass `unknown-pass` + = help: you may want to use --document-private-items warning: the `#![doc(no_default_passes)]` attribute is deprecated --> $DIR/deprecated-attrs.rs:5:8 @@ -11,7 +10,7 @@ LL | #![doc(no_default_passes)] | ^^^^^^^^^^^^^^^^^ | = note: see issue #44136 <https://github.com/rust-lang/rust/issues/44136> for more information - = help: you may want to use `#![doc(document_private_items)]` + = help: `#![doc(no_default_passes)]` no longer functions; you may want to use `#![doc(document_private_items)]` warning: the `#![doc(passes = "...")]` attribute is deprecated --> $DIR/deprecated-attrs.rs:9:8 @@ -20,17 +19,10 @@ LL | #![doc(passes = "collapse-docs unindent-comments")] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: see issue #44136 <https://github.com/rust-lang/rust/issues/44136> for more information - -warning: ignoring unknown pass `collapse-docs` - --> $DIR/deprecated-attrs.rs:9:17 - | -LL | #![doc(passes = "collapse-docs unindent-comments")] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = note: the `collapse-docs` pass was removed in #80261 <https://github.com/rust-lang/rust/pull/80261> + = help: `#![doc(passes = "...")]` no longer functions; you may want to use `#![doc(document_private_items)]` warning: the `#![doc(plugins = "...")]` attribute is deprecated - --> $DIR/deprecated-attrs.rs:14:8 + --> $DIR/deprecated-attrs.rs:13:8 | LL | #![doc(plugins = "xxx")] | ^^^^^^^^^^^^^^^ @@ -38,5 +30,5 @@ LL | #![doc(plugins = "xxx")] = note: see issue #44136 <https://github.com/rust-lang/rust/issues/44136> for more information = warning: `#![doc(plugins = "...")]` no longer functions; see CVE-2018-1000622 <https://nvd.nist.gov/vuln/detail/CVE-2018-1000622> -warning: 5 warnings emitted +warning: 3 warnings emitted diff --git a/src/test/rustdoc-ui/issue-91713.rs b/src/test/rustdoc-ui/issue-91713.rs index b7057d868c2..610bbf11d9c 100644 --- a/src/test/rustdoc-ui/issue-91713.rs +++ b/src/test/rustdoc-ui/issue-91713.rs @@ -1,3 +1,3 @@ // check-pass // compile-flags: --passes list -// error-pattern: the `passes` flag is deprecated +// error-pattern: the `passes` flag no longer functions diff --git a/src/test/rustdoc-ui/issue-91713.stderr b/src/test/rustdoc-ui/issue-91713.stderr index 70c22b3c01e..44ead7a1de2 100644 --- a/src/test/rustdoc-ui/issue-91713.stderr +++ b/src/test/rustdoc-ui/issue-91713.stderr @@ -1,4 +1,5 @@ -warning: the `passes` flag is deprecated +warning: the `passes` flag no longer functions | = note: see issue #44136 <https://github.com/rust-lang/rust/issues/44136> for more information + = help: you may want to use --document-private-items diff --git a/src/test/rustdoc/inline_local/glob-extern-no-defaults.rs b/src/test/rustdoc/inline_local/glob-extern-document-private-items.rs index 55c75dfe27b..a2f0d65efce 100644 --- a/src/test/rustdoc/inline_local/glob-extern-no-defaults.rs +++ b/src/test/rustdoc/inline_local/glob-extern-document-private-items.rs @@ -1,4 +1,4 @@ -// compile-flags: --no-defaults +// compile-flags: --document-private-items #![crate_name = "foo"] diff --git a/src/test/rustdoc/inline_local/glob-private-no-defaults.rs b/src/test/rustdoc/inline_local/glob-private-document-private-items.rs index ac854ac4320..f16d21ecdb1 100644 --- a/src/test/rustdoc/inline_local/glob-private-no-defaults.rs +++ b/src/test/rustdoc/inline_local/glob-private-document-private-items.rs @@ -1,4 +1,4 @@ -// compile-flags: --no-defaults +// compile-flags: --document-private-items #![crate_name = "foo"] diff --git a/src/test/rustdoc/issue-15347.rs b/src/test/rustdoc/issue-15347.rs index fa67da840b7..e93d7401168 100644 --- a/src/test/rustdoc/issue-15347.rs +++ b/src/test/rustdoc/issue-15347.rs @@ -1,4 +1,4 @@ -// compile-flags: --no-defaults --passes collapse-docs --passes unindent-comments +// compile-flags: -Z unstable-options --document-hidden-items // @has issue_15347/fn.foo.html #[doc(hidden)] diff --git a/src/test/rustdoc/issue-42875.rs b/src/test/rustdoc/issue-42875.rs deleted file mode 100644 index 292c2077688..00000000000 --- a/src/test/rustdoc/issue-42875.rs +++ /dev/null @@ -1,13 +0,0 @@ -// compile-flags: --no-defaults - -#![crate_name = "foo"] - -// @has foo/a/index.html '//code' 'use *;' -mod a { - use *; -} - -// @has foo/b/index.html '//code' 'pub use *;' -pub mod b { - pub use *; -} diff --git a/src/test/rustdoc/no-compiler-reexport.rs b/src/test/rustdoc/no-compiler-reexport.rs index 6d50325fed5..d28fdf87b77 100644 --- a/src/test/rustdoc/no-compiler-reexport.rs +++ b/src/test/rustdoc/no-compiler-reexport.rs @@ -1,7 +1,7 @@ -// compile-flags: --no-defaults +// compile-flags: -Z unstable-options --document-hidden-items --document-private-items #![crate_name = "foo"] -// @has 'foo/index.html' '//code' 'extern crate std;' -// @!has 'foo/index.html' '//code' 'use std::prelude::v1::*;' +// @!has 'foo/index.html' '//code' 'extern crate std;' +// @!has 'foo/index.html' '//code' 'use std::prelude' pub struct Foo; |
