Skip to content

hir-ty: add incremental tests checking for infer invalidation #19914

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

Conversation

davidbarsky
Copy link
Contributor

This PR adds some tests that check that infer is invalidated when a DefMap is invalidated. These new tests will need to fixed and renamed #19837 by:

  • renaming tests like adding_use_statement_invalidates_infer to adding_use_statement_should_not_invalidate_infer.
  • Negating the post-edit events assertion to assert!(!format!("{events:?}").contains("infer_shim"), "{events:#?}").

(Full disclosure: I used Claude Sonnet 4 to write these tests. I am, of course, responsible for any code I submit for review, but it wasn't half bad at the job. I had to rename a few tests/example code in the tests, however.)

@davidbarsky davidbarsky requested a review from Veykril June 3, 2025 12:47
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 3, 2025
@davidbarsky davidbarsky force-pushed the davidbarsky/add-some-additional-incrementalism-tests branch from 8df7701 to 98f32c1 Compare June 3, 2025 17:50
@davidbarsky
Copy link
Contributor Author

Updated the tests to assert which queries were run.

@Veykril Veykril added this pull request to the merge queue Jun 4, 2025
Merged via the queue into rust-lang:master with commit d574b1b Jun 4, 2025
14 checks passed
@davidbarsky davidbarsky deleted the davidbarsky/add-some-additional-incrementalism-tests branch June 4, 2025 12:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants