diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2025-04-01 17:24:28 +0200 |
|---|---|---|
| committer | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2025-09-27 11:29:48 +0200 |
| commit | 63aefe0737d0df886955f5a3aa68db865cd97f1b (patch) | |
| tree | 3e3d93701bbc219210abc3c848d6fa883e287e43 /tests/rustdoc-ui/lints | |
| parent | 2d82c99f1e4a4e50b47f75d767b0d1d957357c1a (diff) | |
| download | rust-63aefe0737d0df886955f5a3aa68db865cd97f1b.tar.gz rust-63aefe0737d0df886955f5a3aa68db865cd97f1b.zip | |
Strenghten checks for `doc(auto_cfg(show/hide))` attributes
Diffstat (limited to 'tests/rustdoc-ui/lints')
| -rw-r--r-- | tests/rustdoc-ui/lints/doc_cfg_hide.rs | 1 | ||||
| -rw-r--r-- | tests/rustdoc-ui/lints/doc_cfg_hide.stderr | 8 |
2 files changed, 8 insertions, 1 deletions
diff --git a/tests/rustdoc-ui/lints/doc_cfg_hide.rs b/tests/rustdoc-ui/lints/doc_cfg_hide.rs index abf56318479..4f2625d00ce 100644 --- a/tests/rustdoc-ui/lints/doc_cfg_hide.rs +++ b/tests/rustdoc-ui/lints/doc_cfg_hide.rs @@ -1,2 +1,3 @@ #![doc(auto_cfg(hide = "test"))] //~ ERROR #![doc(auto_cfg(hide))] //~ ERROR +#![doc(auto_cfg(hide(not(windows))))] //~ ERROR diff --git a/tests/rustdoc-ui/lints/doc_cfg_hide.stderr b/tests/rustdoc-ui/lints/doc_cfg_hide.stderr index bb0e52eb666..22501d63c3f 100644 --- a/tests/rustdoc-ui/lints/doc_cfg_hide.stderr +++ b/tests/rustdoc-ui/lints/doc_cfg_hide.stderr @@ -12,5 +12,11 @@ error: `#![doc(auto_cfg(hide(...)))]` only expects a list of items LL | #![doc(auto_cfg(hide))] | ^^^^^^^^^^^^^^ -error: aborting due to 2 previous errors +error: `#![doc(auto_cfg(hide(...)))]` only accepts identifiers or key/values items + --> $DIR/doc_cfg_hide.rs:3:22 + | +LL | #![doc(auto_cfg(hide(not(windows))))] + | ^^^^^^^^^^^^ + +error: aborting due to 3 previous errors |
