Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not attempt to access HIR parent of Synthetic node #123215

Closed
wants to merge 1 commit into from

Conversation

estebank
Copy link
Contributor

Fix #122991. Follow up to #122158.

@rustbot
Copy link
Collaborator

rustbot commented Mar 30, 2024

r? @wesleywiser

rustbot has assigned @wesleywiser.
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

@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 30, 2024
if let hir::Node::Crate(m) = node {
return Some(m.spans.inject_use_span.shrink_to_lo());
for (_hir_id, node) in
[(hir_id, self.hir_node(hir_id))].into_iter().chain(self.hir().parent_iter(hir_id))
Copy link
Member

Choose a reason for hiding this comment

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

I'd rather we not fix this in the parent_iter caller given that it's a bit specific solution to a general problem.

I think we should fix this in TyCtxtFeed::feed_hir -- I'll open a PR, but I'd rather get @petrochenkov to review it as the author of this Node::Synthetic stuff who might have opinions on the API.

edit: #123218

@estebank
Copy link
Contributor Author

Closing in favor of #123218.

@estebank estebank closed this Mar 30, 2024
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.

ICE: no entry found for key
4 participants