diff options
| author | bors <bors@rust-lang.org> | 2024-04-12 18:40:31 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-04-12 18:40:31 +0000 |
| commit | 0d84f0015633809b8dcff9fe1a22318fe0c6d257 (patch) | |
| tree | 1c66f258b65fb6b039067f0e9a1903832a16e858 /tests | |
| parent | 6b1c828d91f72269156cb70561148e511dd4ef15 (diff) | |
| parent | d4a8f61eb321faf9966ba09e4bb777347a70655d (diff) | |
| download | rust-0d84f0015633809b8dcff9fe1a22318fe0c6d257.tar.gz rust-0d84f0015633809b8dcff9fe1a22318fe0c6d257.zip | |
Auto merge of #12635 - Alexendoo:doc-check-attributes, r=Jarcho
Use `check_attributes` in doc lints Ensures we catch all the places that doc comments could occur, found one that we were currently missing - docs on `extern` items changelog: none
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ui/doc/doc-fixable.fixed | 5 | ||||
| -rw-r--r-- | tests/ui/doc/doc-fixable.rs | 5 | ||||
| -rw-r--r-- | tests/ui/doc/doc-fixable.stderr | 13 |
3 files changed, 22 insertions, 1 deletions
diff --git a/tests/ui/doc/doc-fixable.fixed b/tests/ui/doc/doc-fixable.fixed index 178d4a1aa2b..7e22c847b1b 100644 --- a/tests/ui/doc/doc-fixable.fixed +++ b/tests/ui/doc/doc-fixable.fixed @@ -235,3 +235,8 @@ fn parenthesized_word() {} /// OSes /// UXes fn plural_acronym_test() {} + +extern { + /// `foo()` + fn in_extern(); +} diff --git a/tests/ui/doc/doc-fixable.rs b/tests/ui/doc/doc-fixable.rs index 01edb44c64c..3e2cb0df54b 100644 --- a/tests/ui/doc/doc-fixable.rs +++ b/tests/ui/doc/doc-fixable.rs @@ -235,3 +235,8 @@ fn parenthesized_word() {} /// OSes /// UXes fn plural_acronym_test() {} + +extern { + /// foo() + fn in_extern(); +} diff --git a/tests/ui/doc/doc-fixable.stderr b/tests/ui/doc/doc-fixable.stderr index ac876306b39..cd2228c47e3 100644 --- a/tests/ui/doc/doc-fixable.stderr +++ b/tests/ui/doc/doc-fixable.stderr @@ -352,5 +352,16 @@ help: try LL | /// `ABes` | ~~~~~~ -error: aborting due to 32 previous errors +error: item in documentation is missing backticks + --> tests/ui/doc/doc-fixable.rs:240:9 + | +LL | /// foo() + | ^^^^^ + | +help: try + | +LL | /// `foo()` + | ~~~~~~~ + +error: aborting due to 33 previous errors |
