diff options
| author | bors <bors@rust-lang.org> | 2022-05-09 17:14:43 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-05-09 17:14:43 +0000 |
| commit | aa033440da1215a6955fa89c2f71593143144b92 (patch) | |
| tree | 220fa1a1bf6b5e87c1b9a0df54f40f5fadd8e4bc /compiler/rustc_codegen_llvm/src | |
| parent | c3f3c588b0c776bb658ab8e3b803b409b4f63f44 (diff) | |
| parent | 03960ebab26a1b1d2d43540f47aca6670bdc1e54 (diff) | |
| download | rust-aa033440da1215a6955fa89c2f71593143144b92.tar.gz rust-aa033440da1215a6955fa89c2f71593143144b92.zip | |
Auto merge of #8797 - xFrednet:0000-expect-a-playground, r=flip1995
Replace `#[allow]` with `#[expect]` in Clippy Hey `@rust-lang/clippy,` `@Alexendoo,` `@dswij,` I'm currently working on the expect attribute as defined in [Rust RFC 2383](https://rust-lang.github.io/rfcs/2383-lint-reasons.html). With that, an `#[allow]` attribute can be replaced with a `#[expect]` attribute that suppresses the lint, but also emits a warning, if the lint isn't emitted in the expected scope. With this PR I would like to test the attribute on a project scale and Clippy obviously came to mind. This PR replaces (almost) all `#[allow]` attributes in `clippy_utils` and `clippy_lints` with the `#[expect]` attribute. I was also able to remove some allows since, the related FPs have been fixed :tada:. My question is now, are there any concerns regarding this? It's still okay to add normal `#[allow]` attributes, I see the need to nit-pick about that in new PRs, unless it's actually a FP. Also, I would not recommend using `#[expect]` in tests, as changes to a lint could the trigger the expect attribute in other files. Additionally, I've noticed that Clippy has a bunch of `#[allow(clippy::too_many_lines)]` attributes. Should we maybe allow the lint all together or increase the threshold setting? To me, it seems like we mostly just ignore it in our code. :sweat_smile: :upside_down_face: --- changelog: none r? `@flip1995` (I've requested you for now, since you're also helping with reviewing the expect implementation. You are welcome to delegate this PR, even if it should be a simple review :upside_down_face: )
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions
