Skip to content

resolve: Set correct parent and expansion for self declarations#156353

Merged
rust-bors[bot] merged 1 commit intorust-lang:mainfrom
petrochenkov:selfdecl
May 9, 2026
Merged

resolve: Set correct parent and expansion for self declarations#156353
rust-bors[bot] merged 1 commit intorust-lang:mainfrom
petrochenkov:selfdecl

Conversation

@petrochenkov
Copy link
Copy Markdown
Contributor

Follow up to #146972 and #154313.

The parent seems to not be used yet, it will ICE if used (#156185 uses it).
The expn_id is only relevant to macros 2.0, I won't bother coming up with a test.

@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 May 9, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented May 9, 2026

r? @dingxiangfei2009

rustbot has assigned @dingxiangfei2009.
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 73 candidates
  • Random selection from 16 candidates

@petrochenkov
Copy link
Copy Markdown
Contributor Author

r? @mu001999

@rustbot rustbot assigned mu001999 and unassigned dingxiangfei2009 May 9, 2026
@petrochenkov petrochenkov added the beta-nominated Nominated for backporting to the compiler in the beta channel. label May 9, 2026
@petrochenkov
Copy link
Copy Markdown
Contributor Author

I'll stable-nominate as well, because #146972 is on stable, but this certainly doesn't deserve a point release.

@petrochenkov petrochenkov added the stable-nominated Nominated for backporting to the compiler in the stable channel. label May 9, 2026
@mu001999
Copy link
Copy Markdown
Member

mu001999 commented May 9, 2026

@bors r+ rollup

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented May 9, 2026

📌 Commit 16729bc has been approved by mu001999

It is now in the queue for this repository.

@rust-bors rust-bors Bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 9, 2026
@jieyouxu
Copy link
Copy Markdown
Member

jieyouxu commented May 9, 2026

The parent seems to not be used yet, it will ICE if used (#156185 uses it).

@petrochenkov am I understanding correctly that the backport nominations are largely to avoid the ICE?

@petrochenkov
Copy link
Copy Markdown
Contributor Author

The backport is mostly for the use of self_decl (#146972) and trivial fixes to it (#154313 and this PR) to go into the same release.

I'm not sure if the ICE can be triggered before #156185 is merged.
Maybe it's not so important to backport after all.

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request May 9, 2026
resolve: Set correct parent and expansion for `self` declarations

Follow up to rust-lang#146972 and rust-lang#154313.

The `parent` seems to not be used yet, it will ICE if used (rust-lang#156185 uses it).
The `expn_id` is only relevant to macros 2.0, I won't bother coming up with a test.
rust-bors Bot pushed a commit that referenced this pull request May 9, 2026
Rollup of 5 pull requests

Successful merges:

 - #156354 (Update example code of `std::array::from_fn`)
 - #156359 (use `cfg_select!` in integer `{to, from}_{le, be}`)
 - #156124 (Make stable hashing names consistent (part 2))
 - #156235 (fix: Guard SizeSkeleton::compute against stack overflow)
 - #156353 (resolve: Set correct parent and expansion for `self` declarations)
@rust-bors rust-bors Bot merged commit c32a2cd into rust-lang:main May 9, 2026
11 checks passed
@rustbot rustbot added this to the 1.97.0 milestone May 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

beta-nominated Nominated for backporting to the compiler in the beta channel. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. stable-nominated Nominated for backporting to the compiler in the stable channel. 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.

5 participants