Skip to content

Fix Rust raw-string attribute phantom imports - #2628

Merged
Widthdom merged 3 commits into
mainfrom
fix-issue1441
May 24, 2026
Merged

Fix Rust raw-string attribute phantom imports#2628
Widthdom merged 3 commits into
mainfrom
fix-issue1441

Conversation

@Widthdom

Copy link
Copy Markdown
Owner

Summary

  • Mask Rust attribute bodies before Rust type/use-position reference scanning so raw-string doc attributes cannot emit phantom use references.
  • Add regression coverage for #[doc = r"use baz::qux;"] while keeping real use and call references.
  • Add bilingual changelog fragment changelog.d/unreleased/1441.fixed.md.

Fixes #1441

Validation

  • dotnet build CodeIndex.sln -c Release -p:UseSharedCompilation=false
  • dotnet test tests/CodeIndex.Tests/CodeIndex.Tests.csproj -c Release --filter "FullyQualifiedName~ReferenceExtractorTests.Extract_Rust" -p:UseSharedCompilation=false
  • dotnet run --project tools/CodeIndex.Changelog -- check
  • Adversarial review: No blocking/actionable issues found.

Notes

  • A full dotnet test CodeIndex.sln -c Release -p:UseSharedCompilation=false run was attempted but stopped after several minutes of no test progress/output; focused Rust extractor tests and full ReferenceExtractorTests review pass completed successfully.
  • AGENTS.md, CLAUDE.md, and AGENT_GUIDE.md were not modified.

@Widthdom
Widthdom marked this pull request as ready for review May 24, 2026 12:45
@Widthdom
Widthdom merged commit ef10bc8 into main May 24, 2026
10 checks passed
@Widthdom
Widthdom deleted the fix-issue1441 branch May 24, 2026 12:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rust: raw-string attribute body emits phantom use import

1 participant