diff options
| author | bors <bors@rust-lang.org> | 2024-07-03 07:55:05 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-07-03 07:55:05 +0000 |
| commit | 918ae1bec46f156fdfd0e1aba8b080131e91e2af (patch) | |
| tree | 0f6021b545a8bc75a110c4ea451b8ba5309238bb /compiler/rustc_codegen_gcc | |
| parent | 3af20058eb9f2e9fc34a65b1444668b0a0180156 (diff) | |
| parent | ae47b97655d48e7d57f5442b1dfde067b488d4fb (diff) | |
| download | rust-918ae1bec46f156fdfd0e1aba8b080131e91e2af.tar.gz rust-918ae1bec46f156fdfd0e1aba8b080131e91e2af.zip | |
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?
Diffstat (limited to 'compiler/rustc_codegen_gcc')
0 files changed, 0 insertions, 0 deletions
