bors 918ae1bec4 Auto merge of #11647 - flip1995:needless-pass-by-ref-mut-pub-api, r=xFrednet
Honor `avoid-breaking-exported-api` in `needless_pass_by_ref_mut`

Until now, the lint only emitted a warning, when breaking public API. Now it doesn't lint at all when the config value is not set to `false`, bringing it in line with the other lints using this config value.

Also ensures that this config value is documented in the lint.

changelog: none
(I don't think a changelog is necessary, since this lint is in `nursery`)

---

Fixes https://github.com/rust-lang/rust-clippy/issues/11374

cc `@GuillaumeGomez`

Marking as draft: Does this lint even break public API? If I change a function signature from `fn foo(x: &mut T)` to `fn foo(x: &T)`, I can still call it with `foo(&mut x)`. The only "breaking" thing is that the `clippy::unnecessary_mut_passed` lint will complain that `&mut` at the callsite is not necessary, possibly trickling down to the crate user having to remote a `mut` from a variable. [Playground](https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=058165a7663902e84af1d23e35c10d66).

Are there examples where this actually breaks public API, that I'm missing?
2024-07-03 07:55:05 +00:00
..
2024-06-20 13:57:16 +00:00
2024-04-24 13:12:33 +01:00
2024-06-16 18:33:43 -04:00
2024-06-16 18:33:43 -04:00
2024-05-08 21:37:55 +02:00
2024-05-08 21:37:55 +02:00
2024-05-08 21:37:55 +02:00
2024-04-27 10:54:35 +03:00
2024-06-25 17:50:48 +02:00
2024-06-16 18:33:43 -04:00
2024-06-16 18:33:43 -04:00
2024-04-27 10:54:35 +03:00
2024-04-24 13:12:33 +01:00
2024-06-13 12:24:31 +02:00
2024-06-13 12:24:31 +02:00
2024-06-16 22:36:24 -04:00
2024-06-16 22:36:24 -04:00
2024-04-24 13:12:33 +01:00
2024-06-25 17:50:48 +02:00
2024-06-09 07:47:42 +01:00