From f067783461aff336e1273c9948d620d4009aedc4 Mon Sep 17 00:00:00 2001 From: Philipp Krones Date: Sat, 4 Jun 2022 13:34:07 +0200 Subject: Merge commit 'd9ddce8a223cb9916389c039777b6966ea448dc8' into clippyup --- clippy_lints/src/mutable_debug_assertion.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'clippy_lints/src/mutable_debug_assertion.rs') 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, -- cgit 1.4.1-3-g733a5