compiletest: Add testing for lint machinery at runtime - #157721
Open
clubby789 wants to merge 2 commits into
Open
compiletest: Add testing for lint machinery at runtime#157721clubby789 wants to merge 2 commits into
clubby789 wants to merge 2 commits into
Conversation
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.
While implementing #157707, I noticed that we don't have 'runtime' tests for the diagnostic machinery (i.e. we test the derive macros themselves, but not their output when emitted). This introduces a new way to test this machinery.
//@ aux-lint: file.rs, which builds a lint library inauxiliary/file.rsrustc_private, and export aextern "C" fn register_lints(...)compiletest-lint-driverwraps rustc and installs the provided lints when building the testIncluded is a simple demo lint for example
AI Disclosure: I used an LLM to plan out the broad structure of the machinery and identify issues; all code in this PR is written by hand