mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-28 11:07:42 +00:00
![]() feat: enable excluding refs search results in test ## Change Here I introduce a new `ReferenceCategory::Test` type to indicate whether the function where this reference is located is marked as `#[test]`, and expose an config item (`rust-analyzer.references.excludeTests`) to client. I also changed the signature of `ReferenceCategory::new`, adding a `sema: &Semantics<'_, RootDatabase>` param to do some hir analysis. Hope the current implementation is good to go. ## Demo `"rust-analyzer.references.excludeTests": false`  `"rust-analyzer.references.excludeTests": true`  close https://github.com/rust-lang/rust-analyzer/issues/14530 |
||
---|---|---|
.. | ||
src | ||
tests/slow-tests | ||
build.rs | ||
Cargo.toml |