1
Fork 0

Add {{produces}} tag to lint doc comments.

This commit is contained in:
Aaron Kofsky 2022-06-05 12:47:19 -04:00
parent 321a598b75
commit 211feb106a

View file

@ -11,7 +11,7 @@ declare_lint! {
/// scope. /// scope.
/// ///
/// ### Example /// ### Example
/// ```rust /// ```
/// struct SomeStruct; /// struct SomeStruct;
/// impl Drop for SomeStruct { /// impl Drop for SomeStruct {
/// fn drop(&mut self) { /// fn drop(&mut self) {
@ -20,6 +20,7 @@ declare_lint! {
/// } /// }
/// ///
/// fn main() { /// fn main() {
/// #[warn(let_underscore_drop)]
/// // SomeStuct is dropped immediately instead of at end of scope, /// // SomeStuct is dropped immediately instead of at end of scope,
/// // so "Dropping SomeStruct" is printed before "end of main". /// // so "Dropping SomeStruct" is printed before "end of main".
/// // The order of prints would be reversed if SomeStruct was bound to /// // The order of prints would be reversed if SomeStruct was bound to
@ -28,6 +29,9 @@ declare_lint! {
/// println!("end of main"); /// println!("end of main");
/// } /// }
/// ``` /// ```
///
/// {{produces}}
///
/// ### Explanation /// ### Explanation
/// ///
/// Statements which assign an expression to an underscore causes the /// Statements which assign an expression to an underscore causes the
@ -66,6 +70,9 @@ declare_lint! {
/// *lock += 1; /// *lock += 1;
/// }); /// });
/// ``` /// ```
///
/// {{produces}}
///
/// ### Explanation /// ### Explanation
/// ///
/// Statements which assign an expression to an underscore causes the /// Statements which assign an expression to an underscore causes the