diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-10-22 15:28:45 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-10-22 15:28:45 +0200 |
| commit | 83085b99c2647cba54229b942978e4b0d79bf14f (patch) | |
| tree | 8b45091767dd62360dc3851f349654239eac04eb /tests | |
| parent | cbb85f1bd5e0323776b0cf83d4e0e68abcd1a7f9 (diff) | |
| parent | d11a9702ab560ebd54dca1823d6106e1a8811d84 (diff) | |
| download | rust-83085b99c2647cba54229b942978e4b0d79bf14f.tar.gz rust-83085b99c2647cba54229b942978e4b0d79bf14f.zip | |
Rollup merge of #131732 - m4tx:fix-82824, r=davidtwco
Add doc(plugins), doc(passes), etc. to INVALID_DOC_ATTRIBUTES This fixes #82824.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/rustdoc-ui/deprecated-attrs.rs | 19 | ||||
| -rw-r--r-- | tests/rustdoc-ui/deprecated-attrs.stderr | 35 |
2 files changed, 31 insertions, 23 deletions
diff --git a/tests/rustdoc-ui/deprecated-attrs.rs b/tests/rustdoc-ui/deprecated-attrs.rs index e4802ee2518..3b59e05a012 100644 --- a/tests/rustdoc-ui/deprecated-attrs.rs +++ b/tests/rustdoc-ui/deprecated-attrs.rs @@ -1,16 +1,21 @@ -//@ check-pass //@ compile-flags: --passes unknown-pass //@ error-pattern: the `passes` flag no longer functions #![doc(no_default_passes)] -//~^ WARNING attribute is deprecated +//~^ ERROR unknown `doc` attribute `no_default_passes` +//~| NOTE no longer functions //~| NOTE see issue #44136 -//~| HELP no longer functions; you may want to use `#![doc(document_private_items)]` +//~| HELP you may want to use `doc(document_private_items)` +//~| NOTE `doc(no_default_passes)` is now a no-op +//~| NOTE `#[deny(invalid_doc_attributes)]` on by default #![doc(passes = "collapse-docs unindent-comments")] -//~^ WARNING attribute is deprecated +//~^ ERROR unknown `doc` attribute `passes` +//~| NOTE no longer functions //~| NOTE see issue #44136 -//~| HELP no longer functions; you may want to use `#![doc(document_private_items)]` +//~| HELP you may want to use `doc(document_private_items)` +//~| NOTE `doc(passes)` is now a no-op #![doc(plugins = "xxx")] -//~^ WARNING attribute is deprecated +//~^ ERROR unknown `doc` attribute `plugins` //~| NOTE see issue #44136 -//~| WARNING no longer functions; see CVE +//~| NOTE no longer functions +//~| NOTE `doc(plugins)` is now a no-op diff --git a/tests/rustdoc-ui/deprecated-attrs.stderr b/tests/rustdoc-ui/deprecated-attrs.stderr index 45b20ce70ef..a30523e7329 100644 --- a/tests/rustdoc-ui/deprecated-attrs.stderr +++ b/tests/rustdoc-ui/deprecated-attrs.stderr @@ -3,32 +3,35 @@ 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 -warning: the `#![doc(no_default_passes)]` attribute is deprecated - --> $DIR/deprecated-attrs.rs:5:8 +error: unknown `doc` attribute `no_default_passes` + --> $DIR/deprecated-attrs.rs:4:8 | LL | #![doc(no_default_passes)] - | ^^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^^^^^ no longer functions | - = note: see issue #44136 <https://github.com/rust-lang/rust/issues/44136> for more information - = help: `#![doc(no_default_passes)]` no longer functions; you may want to use `#![doc(document_private_items)]` + = note: `doc` attribute `no_default_passes` no longer functions; see issue #44136 <https://github.com/rust-lang/rust/issues/44136> + = help: you may want to use `doc(document_private_items)` + = note: `doc(no_default_passes)` is now a no-op + = note: `#[deny(invalid_doc_attributes)]` on by default -warning: the `#![doc(passes = "...")]` attribute is deprecated - --> $DIR/deprecated-attrs.rs:9:8 +error: unknown `doc` attribute `passes` + --> $DIR/deprecated-attrs.rs:11:8 | LL | #![doc(passes = "collapse-docs unindent-comments")] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no longer functions | - = note: see issue #44136 <https://github.com/rust-lang/rust/issues/44136> for more information - = help: `#![doc(passes = "...")]` no longer functions; you may want to use `#![doc(document_private_items)]` + = note: `doc` attribute `passes` no longer functions; see issue #44136 <https://github.com/rust-lang/rust/issues/44136> + = help: you may want to use `doc(document_private_items)` + = note: `doc(passes)` is now a no-op -warning: the `#![doc(plugins = "...")]` attribute is deprecated - --> $DIR/deprecated-attrs.rs:13:8 +error: unknown `doc` attribute `plugins` + --> $DIR/deprecated-attrs.rs:17:8 | LL | #![doc(plugins = "xxx")] - | ^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^^^ no longer functions | - = 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> + = note: `doc` attribute `plugins` no longer functions; see issue #44136 <https://github.com/rust-lang/rust/issues/44136> and CVE-2018-1000622 <https://nvd.nist.gov/vuln/detail/CVE-2018-1000622> + = note: `doc(plugins)` is now a no-op -warning: 3 warnings emitted +error: aborting due to 3 previous errors |
