diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2023-07-03 22:48:40 +0200 |
|---|---|---|
| committer | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2023-07-03 22:48:40 +0200 |
| commit | 33adfcd327880f45fce08660c1bd70f83ce09f84 (patch) | |
| tree | 4271c8c82a036942dcaccd7e5c9e57dd124dfbc0 | |
| parent | dd3e00f102aa9773c10a645db37c3a10967f31cb (diff) | |
| download | rust-33adfcd327880f45fce08660c1bd70f83ce09f84.tar.gz rust-33adfcd327880f45fce08660c1bd70f83ce09f84.zip | |
Add warning for `NEEDLESS_PASS_BY_REF_MUT` lint about the fact that it changes API
| -rw-r--r-- | clippy_lints/src/needless_pass_by_ref_mut.rs | 3 |
1 files changed, 3 insertions, 0 deletions
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. |
