@@ -13,11 +13,11 @@ Note that, except for `missing_docs`, these lints are only available when runnin
13
13
14
14
Here is the list of the lints provided by ` rustdoc ` :
15
15
16
- ## broken_intra_doc_links
16
+ ## ` broken_intra_doc_links `
17
17
18
18
This lint ** warns by default** . This lint detects when an [ intra-doc link] fails to be resolved. For example:
19
19
20
- [ intra-doc link ] : linking-to-items-by-name.md
20
+ [ intra-doc link ] : write-documentation/ linking-to-items-by-name.md
21
21
22
22
``` rust
23
23
/// I want to link to [`Nonexistent`] but it doesn't exist!
@@ -64,7 +64,7 @@ help: to link to the function, add parentheses
64
64
65
65
```
66
66
67
- ## private_intra_doc_links
67
+ ## ` private_intra_doc_links `
68
68
69
69
This lint ** warns by default** . This lint detects when [ intra-doc links] from public to private items.
70
70
For example:
@@ -104,9 +104,9 @@ warning: public documentation for `public` links to private item `private`
104
104
= note: this link resolves only because you passed `--document-private-items`, but will break without
105
105
```
106
106
107
- [ intra-doc links ] : linking-to-items-by-name.html
107
+ [ intra-doc links ] : write-documentation/ linking-to-items-by-name.md
108
108
109
- ## missing_docs
109
+ ## ` missing_docs `
110
110
111
111
This lint is ** allowed by default** . It detects items missing documentation.
112
112
For example:
@@ -130,7 +130,7 @@ warning: missing documentation for a function
130
130
131
131
Note that unlike other rustdoc lints, this lint is also available from ` rustc ` directly.
132
132
133
- ## missing_crate_level_docs
133
+ ## ` missing_crate_level_docs `
134
134
135
135
This lint is ** allowed by default** . It detects if there is no documentation
136
136
at the crate root. For example:
@@ -154,7 +154,7 @@ warning in the future. This is intended as a means to introduce new users on
154
154
get started, without providing overwhelming warnings like ` missing_docs `
155
155
might.
156
156
157
- ## missing_doc_code_examples
157
+ ## ` missing_doc_code_examples `
158
158
159
159
This lint is ** allowed by default** and is ** nightly-only** . It detects when a documentation block
160
160
is missing a code example. For example:
@@ -190,7 +190,7 @@ To fix the lint, you need to add a code example into the documentation block:
190
190
pub fn no_code_example () {}
191
191
```
192
192
193
- ## private_doc_tests
193
+ ## ` private_doc_tests `
194
194
195
195
This lint is ** allowed by default** . It detects documentation tests when they
196
196
are on a private item. For example:
@@ -223,7 +223,7 @@ warning: Documentation test in private item
223
223
| |___________^
224
224
```
225
225
226
- ## invalid_codeblock_attributes
226
+ ## ` invalid_codeblock_attributes `
227
227
228
228
This lint ** warns by default** . It detects code block attributes in
229
229
documentation examples that have potentially mis-typed values. For example:
@@ -259,7 +259,7 @@ warning: unknown attribute `should-panic`. Did you mean `should_panic`?
259
259
In the example above, the correct form is ` should_panic ` . This helps detect
260
260
typo mistakes for some common attributes.
261
261
262
- ## invalid_html_tags
262
+ ## ` invalid_html_tags `
263
263
264
264
This lint is ** allowed by default** and is ** nightly-only** . It detects unclosed
265
265
or invalid HTML tags. For example:
@@ -298,7 +298,7 @@ warning: unclosed HTML tag `h1`
298
298
warning: 2 warnings emitted
299
299
```
300
300
301
- ## invalid_rust_codeblocks
301
+ ## ` invalid_rust_codeblocks `
302
302
303
303
This lint ** warns by default** . It detects Rust code blocks in documentation
304
304
examples that are invalid (e.g. empty, not parsable as Rust). For example:
@@ -342,7 +342,7 @@ warning: could not parse code block as Rust code
342
342
= note: error from rustc: unterminated character literal
343
343
```
344
344
345
- ## bare_urls
345
+ ## ` bare_urls `
346
346
347
347
This lint is ** warn-by-default** . It detects URLs which are not links.
348
348
For example:
0 commit comments