Merge pull request #20553 from ChayimFriedman2/ns-highlight-attach
Some checks are pending
metrics / build_metrics (push) Waiting to run
metrics / other_metrics (diesel-1.4.8) (push) Blocked by required conditions
metrics / other_metrics (hyper-0.14.18) (push) Blocked by required conditions
metrics / other_metrics (ripgrep-13.0.0) (push) Blocked by required conditions
metrics / other_metrics (self) (push) Blocked by required conditions
metrics / other_metrics (webrender-2022) (push) Blocked by required conditions
metrics / generate_final_metrics (push) Blocked by required conditions
rustdoc / rustdoc (push) Waiting to run

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 6b4569dccd
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()