]> git.lizzy.rs Git - rust.git/commitdiff
Rollup merge of #85223 - simbleau:master, r=steveklabnik
authorManish Goregaokar <manishsmail@gmail.com>
Fri, 1 Oct 2021 21:46:46 +0000 (14:46 -0700)
committerGitHub <noreply@github.com>
Fri, 1 Oct 2021 21:46:46 +0000 (14:46 -0700)
rustdoc: Clarified the attribute which prompts the warning

The example call was lacking clarification of the  `#![warn(rustdoc::invalid_codeblock_attributes)]` attribute which generates the specified warning.

src/doc/rustdoc/src/lints.md

index 16b091eb255b0257bc2090414f418f0dd7b081ba..d5981dd83de8c2067f66c759a48cbc6bbbd074b2 100644 (file)
@@ -70,6 +70,8 @@ This lint **warns by default**. This lint detects when [intra-doc links] from pu
 For example:
 
 ```rust
+#![warn(rustdoc::private_intra_doc_links)] // note: unecessary - warns by default.
+
 /// [private]
 pub fn public() {}
 fn private() {}
@@ -227,6 +229,8 @@ This lint **warns by default**. It detects code block attributes in
 documentation examples that have potentially mis-typed values. For example:
 
 ```rust
+#![warn(rustdoc::invalid_codeblock_attributes)]  // note: unecessary - warns by default.
+
 /// Example.
 ///
 /// ```should-panic
@@ -344,6 +348,8 @@ This lint is **warn-by-default**. It detects URLs which are not links.
 For example:
 
 ```rust
+#![warn(rustdoc::bare_urls)] // note: unecessary - warns by default.
+
 /// http://example.org
 /// [http://example.net]
 pub fn foo() {}