ref: Enable the allow_attributes lint and fix violations - #1257
Merged
Conversation
szokeasaurusrex
marked this pull request as ready for review
July 21, 2026 14:47
szokeasaurusrex
force-pushed
the
szokeasaurusrex/disallow-allow
branch
2 times, most recently
from
July 27, 2026 09:17
7573887 to
29e2ab6
Compare
szokeasaurusrex
force-pushed
the
szokeasaurusrex/disallow-allow
branch
from
July 27, 2026 09:44
29e2ab6 to
c6bfa26
Compare
The [`allow_attributes`](https://rust-lang.github.io/rust-clippy/master/#allow_attributes) lint disallows using `#[allow]`, forcing to use `#[except]` instead. `#[except]` is generally better than `#[allow]` because `#[expect]` errors if the expectation is unfulfilled, meaning that we don't have stale annotations floating around the codebase. This also fixes the violations by: - Removing `#[allow]` completely where it is not needed - Fixing the underlying violation, when this can be done trivially, and/or where we cannot use `allow` becuase the lint only triggers on some compilation targets - Replacing `#[allow]` with `#[expect]` Resolves [#1256](#1256) Resolves [RUST-267](https://linear.app/getsentry/issue/RUST-267)
szokeasaurusrex
force-pushed
the
szokeasaurusrex/disallow-allow
branch
from
July 27, 2026 12:10
c6bfa26 to
09823b7
Compare
alexander-alderman-webb
approved these changes
Jul 27, 2026
alexander-alderman-webb
approved these changes
Jul 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
allow_attributeslint disallows using#[allow], forcing to use#[except]instead.#[except]is generally better than#[allow]because#[expect]errors if the expectation is unfulfilled, meaning that we don't have stale annotations floating around the codebase.This also fixes the violations by:
#[allow]completely where it is not neededallowbecuase the lint only triggers on some compilation targets#[allow]with#[expect]Resolves #1256
Resolves RUST-267