-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
Support recursive delegation #150024
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
base: main
Are you sure you want to change the base?
Support recursive delegation #150024
Conversation
|
@rustbot ready |
compiler/rustc_middle/src/ty/mod.rs
Outdated
|
|
||
| /// Information about functions signatures for delegation items expansion | ||
| pub delegation_fn_sigs: LocalDefIdMap<DelegationFnSig>, | ||
| // NodeIds for delegation signature resolution |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment repeats the field name and doesn't say anything about what these ids mean and why they are necessary when we already have item ids and delegation ids.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added more descriptive comment with a reference to a github comment with deeper explanation.
| let sig_id = self.get_delegation_sig_id(item_id, delegation.id, span, is_in_trait_impl); | ||
|
|
||
| let sig_id = self.get_delegation_sig_id( | ||
| self.get_delegation_sig_node_id(&self.local_def_id(item_id)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the difference between "sig id" and "sig node id"?
It's hard to understand what's going on without some consistent naming and comments telling what is what.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As get_delegation_sig_node_id method was removed, and with a comment on delegation_sig_resolution_nodes and comments in get_delegation_sig_id method I believe it should be clear now.
|
@rustbot ready |
This PR adds support for recursive delegations and is a part of the delegation feature #118212.
r? @petrochenkov