about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAaron Kofsky <aaronko@umich.edu>2022-06-05 12:47:19 -0400
committerAaron Kofsky <aaronko@umich.edu>2022-06-05 12:47:19 -0400
commit211feb106a188fef698bb36d19402808f9930154 (patch)
treea90c902e44ebc4d9b99979213639c1d0d73e83bb
parent321a598b7519733aff7dea8b4ebd3631626d656b (diff)
downloadrust-211feb106a188fef698bb36d19402808f9930154.tar.gz
rust-211feb106a188fef698bb36d19402808f9930154.zip
Add `{{produces}}` tag to lint doc comments.
-rw-r--r--compiler/rustc_lint/src/let_underscore.rs9
1 files changed, 8 insertions, 1 deletions
diff --git a/compiler/rustc_lint/src/let_underscore.rs b/compiler/rustc_lint/src/let_underscore.rs
index dea878c4460..520c865cc19 100644
--- a/compiler/rustc_lint/src/let_underscore.rs
+++ b/compiler/rustc_lint/src/let_underscore.rs
@@ -11,7 +11,7 @@ declare_lint! {
     /// scope.
     ///
     /// ### Example
-    /// ```rust
+    /// ```
     /// struct SomeStruct;
     /// impl Drop for SomeStruct {
     ///     fn drop(&mut self) {
@@ -20,6 +20,7 @@ declare_lint! {
     /// }
     ///
     /// fn main() {
+    ///    #[warn(let_underscore_drop)]
     ///     // SomeStuct is dropped immediately instead of at end of scope,
     ///     // so "Dropping SomeStruct" is printed before "end of main".
     ///     // The order of prints would be reversed if SomeStruct was bound to
@@ -28,6 +29,9 @@ declare_lint! {
     ///     println!("end of main");
     /// }
     /// ```
+    ///
+    /// {{produces}}
+    ///
     /// ### Explanation
     ///
     /// Statements which assign an expression to an underscore causes the
@@ -66,6 +70,9 @@ declare_lint! {
     ///     *lock += 1;
     /// });
     /// ```
+    ///
+    /// {{produces}}
+    ///
     /// ### Explanation
     ///
     /// Statements which assign an expression to an underscore causes the