-
-
Notifications
You must be signed in to change notification settings - Fork 326
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
Use #[expect(…)] instead of #[allow(…)], remove unnecessary allows #2784
base: main
Are you sure you want to change the base?
Use #[expect(…)] instead of #[allow(…)], remove unnecessary allows #2784
Conversation
Feel free to fix this for all build targets - but it might be a world of pain :) |
I did some more, but I'll leave the rest to someone else. |
Also: I cannot guarantee that I haven't broken anything. I've manually checked as much as possible and the CI found stuff as well, but I may have still missed some cfg-dependent stuff (there's a lot in there lol). On the upside, I've only touched linting-related things. So if anyone's computer starts complaining, it's easy to just re-add the warning or change it back from an |
|
||
# start manager in background, then start one client | ||
timeout 32s ./${FUZZER_NAME} --cores 0 --input ./corpus 2>/dev/null & | ||
timeout 31s ./${FUZZER_NAME} --cores 1 --input ./corpus | tee fuzz_stdout.log 2>/dev/null || true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added this, otherwise the test doesn't pass. Doesn't either on main btw.
And a few other very small tidbits here and there. Just tidying things with as little change to the logic as possible.
#[expect(…)]
returns a lint warning (configured to be an error) if the lint warning is not present without the attribute.This also means I was able to remove a lot of
allow
statements.I suggest in the future,
expect
is used wherever possible. The only exceptions I've stumbled across are when they are used in a macro and only appear for some macro calls (thinktrivial_numeric_casts
of au64
to a type passed to the struct, and it is called foru64
among others) and if the warning only appears in certain cfgs.