about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-12-29 10:52:00 +0000
committerbors <bors@rust-lang.org>2023-12-29 10:52:00 +0000
commit174a0d7be6f18bf6470a46d107e4b3f0b870c315 (patch)
tree90d39c5335b6b09cb977daf3830992db0bec3f0a /compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp
parent8b22471274284f5f117ae284634a3d8d0abb7266 (diff)
parentfa7dd1c4e0106ce0346236801653188689dbaa43 (diff)
downloadrust-174a0d7be6f18bf6470a46d107e4b3f0b870c315.tar.gz
rust-174a0d7be6f18bf6470a46d107e4b3f0b870c315.zip
Auto merge of #10283 - ParkMyCar:lint/pub_underscore_fields, r=blyxyas
feature: add new lint `pub_underscore_fields`

fixes: #10282

This PR introduces a new lint `pub_underscore_fields` that lints when a user has marked a field of a struct as public, but also prefixed it with an underscore (`_`). This is something users should avoid because the two ideas are contradictory. Prefixing a field with an `_` is inferred as the field being unused, but making a field public infers that it will be used.

- \[x] Followed [lint naming conventions][lint_naming]
  - I believe I followed the naming conventions, more than happy to update the naming if I did not :)
- \[x] Added passing UI tests (including committed `.stderr` file)
- \[x] `cargo test` passes locally
- \[x] Executed `cargo dev update_lints`
- \[x] Added lint documentation
- \[x] Run `cargo dev fmt`

---

changelog: new lint: [`pub_underscore_fields`]
[#10283](https://github.com/rust-lang/rust-clippy/pull/10283)
<!-- changelog_checked -->
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp')
0 files changed, 0 insertions, 0 deletions