File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ #![ feature( rustdoc_texmath) ]
2+ #![ deny( unused_doc_comments) ]
3+
4+ #[ doc( syntax="+tex_math_dollars" ) ]
5+ pub fn foo ( ) { }
6+
7+ pub fn bar ( ) {
8+ #[ doc( syntax="+tex_math_dollars" ) ]
9+ // there should be an unused_doc_comments line here
10+ fn baz ( ) { }
11+ #[ doc( syntax="+tex_math_dollars" ) ]
12+ // there should be an unused_doc_comments line here
13+ struct Baz ;
14+ }
15+
16+ #[ doc( syntax="+tex_math_dollars" ) ]
17+ //~^ ERROR unused_doc_comments
18+ unsafe extern "C" {
19+ pub unsafe fn quux ( ) ;
20+ }
21+
22+ unsafe extern "C" {
23+ #[ doc( syntax="+tex_math_dollars" ) ]
24+ pub unsafe fn zzyzx ( ) ;
25+ }
Original file line number Diff line number Diff line change 1+ error: unused doc comment
2+ --> $DIR/unused-doc-syntax.rs:16:1
3+ |
4+ LL | #[doc(syntax="+tex_math_dollars")]
5+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6+ LL |
7+ LL | / unsafe extern "C" {
8+ LL | | pub unsafe fn quux();
9+ LL | | }
10+ | |_- rustdoc does not generate documentation for extern blocks
11+ |
12+ = help: use `//` for a plain comment
13+ note: the lint level is defined here
14+ --> $DIR/unused-doc-syntax.rs:2:9
15+ |
16+ LL | #![deny(unused_doc_comments)]
17+ | ^^^^^^^^^^^^^^^^^^^
18+
19+ error: aborting due to 1 previous error
20+
You can’t perform that action at this time.
0 commit comments