-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Test that all interned symbols are referenced in Clippy sources #14842
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
base: master
Are you sure you want to change the base?
Conversation
r? @Alexendoo rustbot has assigned @Alexendoo. Use |
f387524
to
76de08b
Compare
This comment has been minimized.
This comment has been minimized.
76de08b
to
f345950
Compare
Rebased |
tests/symbols-used.rs
Outdated
// This test only runs when the `internal` feature is set, to allow | ||
// developers to temporarily define new, yet unused symbols without | ||
// failing the tests. Also, the test is a no-op if run as part of the | ||
// compiler test suite. |
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.
IMO ditch the cfg
, it's surprising that a test that doesn't require internals gets skipped without it
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.
Done.
tests/symbols-used.rs
Outdated
#[tokio::test] | ||
#[allow(clippy::case_sensitive_file_extension_comparisons)] | ||
async fn all_symbols_are_used() -> Result<()> { |
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.
Since we're just using tokio for its threadpool here perhaps used_symbols
should use rayon instead, the other things can run serially
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.
Ok, I was reluctant to add rayon
as a new dependency, I'll make the change.
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.
Done
f345950
to
eb03af0
Compare
eb03af0
to
5ee0480
Compare
This test checks that all symbols defined in Clippy's
sym.rs
file are used in Clippy. Otherwise, it will fail with a list of symbols which are unused.This test only runs when the
internal
feature is set, to allow developers to temporarily define new, yet unused symbols without failing the tests. Also, it will not run as part of the compiler test suite, as an extra symbol should never be seen as a fatal problem in the compiler repo.changelog: none