rust/tests
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
..
test_utils
ui Auto merge of #11647 - flip1995:needless-pass-by-ref-mut-pub-api, r=xFrednet 2024-07-03 07:55:05 +00:00
ui-cargo Merge remote-tracking branch 'upstream/master' into rustup 2024-06-27 18:49:59 +02:00
ui-internal Merge commit 'c9139bd546' into clippy-subtree-update 2024-05-30 10:49:05 +02:00
ui-toml Honor avoid-breaking-exported-api in needless_pass_by_ref_mut 2024-07-02 19:30:01 +02:00
workspace_test
check-fmt.rs
clippy.toml
compile-test.rs Merge commit '20b085d500' into clippy-subtree-update 2024-05-02 17:26:44 +02:00
dogfood.rs Stabilize LazyCell and LazyLock (lazy_cell) 2024-02-20 20:55:13 -07:00
headers.rs Merge commit 'a859e5cc1c' into clippyup 2023-12-16 14:12:50 +01:00
integration.rs use short message format in integration test 2024-06-23 17:20:07 +02:00
lint_message_convention.rs Stabilize LazyCell and LazyLock (lazy_cell) 2024-02-20 20:55:13 -07:00
missing-test-files.rs Merge commit '93f0a9a91f' into clippy-subtree-update 2024-03-07 17:19:29 +01:00
versioncheck.rs Merge commit '09ac14c901' into clippyup 2023-11-02 17:35:56 +01:00
workspace.rs Stabilize LazyCell and LazyLock (lazy_cell) 2024-02-20 20:55:13 -07:00