Skip to content

chore: replace allow with expect for most simple cases #7706

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

nyurik
Copy link
Contributor

@nyurik nyurik commented Apr 9, 2025

The #[expect(...)] is usually better than #[allow(...)] because it verifies the assumption that disabling a warning is still relevant to the code - thus eliminating the dead code when warning is no longer there.

Here I tried to replace most allow with expect, but kept back any cases which caused an issue - those will have to be dealt one by one.

@nyurik nyurik changed the title chore: use expect instead of allow chore: replace allow with expect for most simple cases Apr 9, 2025
Copy link

github-actions bot commented Apr 9, 2025

GNU testsuite comparison:

Skip an intermittent issue tests/timeout/timeout (fails in this run but passes in the 'main' branch)
Skipping an intermittent issue tests/misc/stdbuf (passes in this run but fails in the 'main' branch)

Copy link

github-actions bot commented Apr 9, 2025

GNU testsuite comparison:

Skipping an intermittent issue tests/misc/stdbuf (passes in this run but fails in the 'main' branch)

Copy link

github-actions bot commented Apr 9, 2025

GNU testsuite comparison:

Skipping an intermittent issue tests/misc/stdbuf (passes in this run but fails in the 'main' branch)

@nyurik nyurik marked this pull request as draft April 9, 2025 08:03
The `#[expect(...)]` is usually better than `#[allow(...)]` because it verifies the assumption that disabling a warning is still relevant to the code - thus eliminating the dead code when warning is no longer there.

Here I tried to replace most `allow` with `expect`, but kept back any cases which caused an issue - those will have to be dealt one by one.
Copy link

GNU testsuite comparison:

Skip an intermittent issue tests/tail/inotify-dir-recreate (fails in this run but passes in the 'main' branch)
Skip an intermittent issue tests/timeout/timeout (fails in this run but passes in the 'main' branch)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant