Skip to content

Reuse method attribute anchors for generated awaits - #373

Open
charliermarsh wants to merge 1 commit into
charlie/ohm-27-anchor-inherent-method-attributesfrom
charlie/ohm-28-anchor-generated-await-spans
Open

charliermarsh wants to merge 1 commit into
charlie/ohm-27-anchor-inherent-method-attributesfrom
charlie/ohm-28-anchor-generated-await-spans

Conversation

@charliermarsh

@charliermarsh charliermarsh commented Nov 8, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

When an attribute macro generates an .await at the method attribute’s own location, HIR lowering can reuse the preceding method as its span parent. Moving the methods together preserves the generated HIR. The linked test observes the new line and column, and a type error points to the moved attribute.

On top of #372, the seven-file uv edit used 0.871% fewer rustc instructions in uv-resolver and 0.234% fewer across the workspace in eight pairs. uv edit

@charliermarsh
charliermarsh force-pushed the charlie/ohm-28-anchor-generated-await-spans branch from 9493fb1 to 889dc4d Compare November 8, 2026 14:19
@charliermarsh
charliermarsh marked this pull request as ready for review November 8, 2026 14:21
@charliermarsh
charliermarsh added this pull request to stack #377 November 8, 2026 14:21
@charliermarsh
charliermarsh removed this pull request from stack #377 November 8, 2026 17:51
@charliermarsh
charliermarsh added this pull request to stack #381 November 8, 2026 17:51
@charliermarsh
charliermarsh force-pushed the charlie/ohm-28-anchor-generated-await-spans branch from 889dc4d to 69ead4a Compare November 17, 2026 07:31
@charliermarsh
charliermarsh removed this pull request from stack #381 November 17, 2026 07:33
@charliermarsh
charliermarsh added this pull request to stack #426 November 17, 2026 07:33
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.

1 participant