Skip to content

Use #[expect] instead of #[allow] for Clippy lint exclusions#584

Merged
edmorley merged 1 commit into
mainfrom
edmorley/use-expect-clippy-attr
Jun 16, 2026
Merged

Use #[expect] instead of #[allow] for Clippy lint exclusions#584
edmorley merged 1 commit into
mainfrom
edmorley/use-expect-clippy-attr

Conversation

@edmorley

Copy link
Copy Markdown
Member

Unlike #[allow], #[expect] (stable since Rust 1.81) emits a warning if
the lint stops firing, so the attribute flags itself as removable should the
lint no longer apply:
https://doc.rust-lang.org/rustc/lints/levels.html#expect

GUS-W-23022354.

Unlike `#[allow]`, `#[expect]` (stable since Rust 1.81) emits a warning if
the lint stops firing, so the attribute flags itself as removable should the
lint no longer apply:
https://doc.rust-lang.org/rustc/lints/levels.html#expect

GUS-W-23022354.
@edmorley edmorley added the skip changelog Skip the check-changelog check label Jun 16, 2026
@edmorley edmorley self-assigned this Jun 16, 2026
@edmorley edmorley marked this pull request as ready for review June 16, 2026 13:52
@edmorley edmorley requested a review from a team as a code owner June 16, 2026 13:52
@edmorley edmorley enabled auto-merge (squash) June 16, 2026 13:52
@edmorley edmorley merged commit 2fca3a3 into main Jun 16, 2026
9 of 10 checks passed
@edmorley edmorley deleted the edmorley/use-expect-clippy-attr branch June 16, 2026 14:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip changelog Skip the check-changelog check

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants