@@ -13,11 +13,11 @@ Note that, except for `missing_docs`, these lints are only available when runnin
1313
1414Here is the list of the lints provided by ` rustdoc ` :
1515
16- ## broken_intra_doc_links
16+ ## ` broken_intra_doc_links `
1717
1818This lint ** warns by default** . This lint detects when an [ intra-doc link] fails to be resolved. For example:
1919
20- [ intra-doc link ] : linking-to-items-by-name.md
20+ [ intra-doc link ] : write-documentation/ linking-to-items-by-name.md
2121
2222``` rust
2323/// I want to link to [`Nonexistent`] but it doesn't exist!
@@ -64,7 +64,7 @@ help: to link to the function, add parentheses
6464
6565```
6666
67- ## private_intra_doc_links
67+ ## ` private_intra_doc_links `
6868
6969This lint ** warns by default** . This lint detects when [ intra-doc links] from public to private items.
7070For example:
@@ -104,9 +104,9 @@ warning: public documentation for `public` links to private item `private`
104104 = note: this link resolves only because you passed `--document-private-items`, but will break without
105105```
106106
107- [ intra-doc links ] : linking-to-items-by-name.html
107+ [ intra-doc links ] : write-documentation/ linking-to-items-by-name.md
108108
109- ## missing_docs
109+ ## ` missing_docs `
110110
111111This lint is ** allowed by default** . It detects items missing documentation.
112112For example:
@@ -130,7 +130,7 @@ warning: missing documentation for a function
130130
131131Note that unlike other rustdoc lints, this lint is also available from ` rustc ` directly.
132132
133- ## missing_crate_level_docs
133+ ## ` missing_crate_level_docs `
134134
135135This lint is ** allowed by default** . It detects if there is no documentation
136136at the crate root. For example:
@@ -154,7 +154,7 @@ warning in the future. This is intended as a means to introduce new users on
154154get started, without providing overwhelming warnings like ` missing_docs `
155155might.
156156
157- ## missing_doc_code_examples
157+ ## ` missing_doc_code_examples `
158158
159159This lint is ** allowed by default** and is ** nightly-only** . It detects when a documentation block
160160is 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:
190190pub fn no_code_example () {}
191191```
192192
193- ## private_doc_tests
193+ ## ` private_doc_tests `
194194
195195This lint is ** allowed by default** . It detects documentation tests when they
196196are on a private item. For example:
@@ -223,7 +223,7 @@ warning: Documentation test in private item
223223 | |___________^
224224```
225225
226- ## invalid_codeblock_attributes
226+ ## ` invalid_codeblock_attributes `
227227
228228This lint ** warns by default** . It detects code block attributes in
229229documentation examples that have potentially mis-typed values. For example:
@@ -259,7 +259,7 @@ warning: unknown attribute `should-panic`. Did you mean `should_panic`?
259259In the example above, the correct form is ` should_panic ` . This helps detect
260260typo mistakes for some common attributes.
261261
262- ## invalid_html_tags
262+ ## ` invalid_html_tags `
263263
264264This lint is ** allowed by default** and is ** nightly-only** . It detects unclosed
265265or invalid HTML tags. For example:
@@ -298,7 +298,7 @@ warning: unclosed HTML tag `h1`
298298warning: 2 warnings emitted
299299```
300300
301- ## invalid_rust_codeblocks
301+ ## ` invalid_rust_codeblocks `
302302
303303This lint ** warns by default** . It detects Rust code blocks in documentation
304304examples 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
342342 = note: error from rustc: unterminated character literal
343343```
344344
345- ## bare_urls
345+ ## ` bare_urls `
346346
347347This lint is ** warn-by-default** . It detects URLs which are not links.
348348For example:
0 commit comments