Skip to content
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

rust-analyzer.references.excludeTests should exclude #[cfg(test)] #18573

Open
glasser opened this issue Nov 29, 2024 · 0 comments
Open

rust-analyzer.references.excludeTests should exclude #[cfg(test)] #18573

glasser opened this issue Nov 29, 2024 · 0 comments
Labels
C-feature Category: feature request

Comments

@glasser
Copy link

glasser commented Nov 29, 2024

#16441 added an awesome new feature to "Find References" to let you ignore tests, and #18212 extended that to "Show call hierarchy" as well.

The goal of this is to help you find where a symbol is used in non-test code. However, the implementation only looks for #[test], and not for #[cfg(test)]. It would be more helpful if this feature also let you skip your test-only test support functions that are not themselves tests: blocks annotated with #[cfg(test)].

@Young-Flash, the author of that PR, agrees: #16441 (comment)

@glasser glasser added the C-feature Category: feature request label Nov 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-feature Category: feature request
Projects
None yet
Development

No branches or pull requests

1 participant