Skip to content

delegation: Track more precise spans for glob delegations#154049

Open
petrochenkov wants to merge 3 commits intorust-lang:mainfrom
petrochenkov:deleglobspan
Open

delegation: Track more precise spans for glob delegations#154049
petrochenkov wants to merge 3 commits intorust-lang:mainfrom
petrochenkov:deleglobspan

Conversation

@petrochenkov
Copy link
Contributor

The last commit also fixes a macro hygiene issue with self in delegations found in #154002.

The span location of the last segment in the desugared path is inherited from the star symbol's span
Instead of the last segment of the delegation path.
`self` is something that introduced by the whole delegation item, not some specific part of it, and the last segment may need to have a different context for path resolution purposes.
@rustbot
Copy link
Collaborator

rustbot commented Mar 18, 2026

The parser was modified, potentially altering the grammar of (stable) Rust
which would be a breaking change.

cc @fmease

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Mar 18, 2026
@rustbot
Copy link
Collaborator

rustbot commented Mar 18, 2026

r? @jackh726

rustbot has assigned @jackh726.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: compiler
  • compiler expanded to 69 candidates
  • Random selection from 15 candidates

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants