From 33adfcd327880f45fce08660c1bd70f83ce09f84 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Mon, 3 Jul 2023 22:48:40 +0200 Subject: [PATCH] Add warning for `NEEDLESS_PASS_BY_REF_MUT` lint about the fact that it changes API --- clippy_lints/src/needless_pass_by_ref_mut.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/clippy_lints/src/needless_pass_by_ref_mut.rs b/clippy_lints/src/needless_pass_by_ref_mut.rs index c5dc87cdfa8..d535963a1dc 100644 --- a/clippy_lints/src/needless_pass_by_ref_mut.rs +++ b/clippy_lints/src/needless_pass_by_ref_mut.rs @@ -22,6 +22,9 @@ declare_clippy_lint! { /// ### What it does /// Check if a `&mut` function argument is actually used mutably. /// + /// Be careful if the function is publically reexported as it would break compatibility with + /// users of this function. + /// /// ### Why is this bad? /// Less `mut` means less fights with the borrow checker. It can also lead to more /// opportunities for parallelization.