about summary refs log tree commit diff
path: root/clippy_lints/src/mutable_debug_assertion.rs
diff options
context:
space:
mode:
authorPhilipp Krones <hello@philkrones.com>2022-06-04 13:34:07 +0200
committerPhilipp Krones <hello@philkrones.com>2022-06-04 13:34:07 +0200
commitf067783461aff336e1273c9948d620d4009aedc4 (patch)
tree0e752a00449438fe3444421e235a133212746859 /clippy_lints/src/mutable_debug_assertion.rs
parent57304823dbd1c246d1166e85c156e694d2f7a184 (diff)
downloadrust-f067783461aff336e1273c9948d620d4009aedc4.tar.gz
rust-f067783461aff336e1273c9948d620d4009aedc4.zip
Merge commit 'd9ddce8a223cb9916389c039777b6966ea448dc8' into clippyup
Diffstat (limited to 'clippy_lints/src/mutable_debug_assertion.rs')
-rw-r--r--clippy_lints/src/mutable_debug_assertion.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/clippy_lints/src/mutable_debug_assertion.rs b/clippy_lints/src/mutable_debug_assertion.rs
index bb6d820b08c..44fdf84c6df 100644
--- a/clippy_lints/src/mutable_debug_assertion.rs
+++ b/clippy_lints/src/mutable_debug_assertion.rs
@@ -22,9 +22,12 @@ declare_clippy_lint! {
     /// ### Example
     /// ```rust,ignore
     /// debug_assert_eq!(vec![3].pop(), Some(3));
+    ///
     /// // or
-    /// fn take_a_mut_parameter(_: &mut u32) -> bool { unimplemented!() }
-    /// debug_assert!(take_a_mut_parameter(&mut 5));
+    ///
+    /// # let mut x = 5;
+    /// # fn takes_a_mut_parameter(_: &mut u32) -> bool { unimplemented!() }
+    /// debug_assert!(takes_a_mut_parameter(&mut x));
     /// ```
     #[clippy::version = "1.40.0"]
     pub DEBUG_ASSERT_WITH_MUT_CALL,