Merge pull request #20553 from ChayimFriedman2/ns-highlight-attach

fix: Attach the db in one more place in highlighting
This commit is contained in:
Chayim Refael Friedman 2025-08-27 22:40:07 +00:00 committed by GitHub
commit da33061e1c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -26,7 +26,8 @@ pub(super) fn ra_fixture(
literal: &ast::String,
expanded: &ast::String,
) -> Option<()> {
let active_parameter = ActiveParameter::at_token(sema, expanded.syntax().clone())?;
let active_parameter =
salsa::attach(sema.db, || ActiveParameter::at_token(sema, expanded.syntax().clone()))?;
let has_rust_fixture_attr = active_parameter.attrs().is_some_and(|attrs| {
attrs.filter_map(|attr| attr.as_simple_path()).any(|path| {
path.segments()