Skip to content

Fix rust-analyzer "Go to Definition" inside #[builder] functions#385

Merged
Veetaha merged 1 commit into
elastio:masterfrom
skreborn:fix-go-to-definition
Jun 10, 2026
Merged

Fix rust-analyzer "Go to Definition" inside #[builder] functions#385
Veetaha merged 1 commit into
elastio:masterfrom
skreborn:fix-go-to-definition

Conversation

@skreborn

Copy link
Copy Markdown
Contributor

Rust-analyzer's "Go to Definition" function is currently broken when used inside a function annotated with #[builder] because of the way it prioritizes spans.

Prior to this change, using "Go to Definition" on any token within the function body led the analyzer wildly astray. After the fix, it correctly jumps to the item definition.

As far as I can tell, this change doesn't introduce any regressions or changes in generated documentation.

@Veetaha Veetaha left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've checked this change, and it seems to work fine. Source links in rustdoc still seem to work correctly. I'll make a patch release asap. Thanks for the PR!

@Veetaha Veetaha merged commit f63ae06 into elastio:master Jun 10, 2026
36 checks passed
@github-actions github-actions Bot mentioned this pull request Jun 10, 2026
@Veetaha

Veetaha commented Jun 10, 2026

Copy link
Copy Markdown
Collaborator

This change was released in v3.9.2

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.

2 participants