delegation: refactor delegation list expansions so they have LocalExpnId#157657
delegation: refactor delegation list expansions so they have LocalExpnId#157657aerooneqq wants to merge 1 commit into
LocalExpnId#157657Conversation
…have `LocalExpnId`
LocalExpnIdLocalExpnId
|
We definitely don't need to delay expansion of list delegations by turning them into I'll think how to better assign some ids to list delegations so they can be used for the "common parent" check. |
| ); | ||
| Node::flatten_outputs(single_delegations.map(|item| { | ||
| let mut item = Node::from_item(item); | ||
| assign_id!(self, item.node_id_mut(), || item.walk_flat_map(self)) |
There was a problem hiding this comment.
I think let my_unique_id = self.cx.resolver.next_node_id() can be used as the unique id corresponding to the delegation list here.
That's unless NodeId ranges are checked for continuousness, or something like that.
Then list_delegation_parent_table.insert(item.node_id(), my_unique_id) here will be enough to keep all the information that we need for checking.
The table can be kept in Resolver, for example.
This PR refactors delegation's list and glob expansions such that they both use the same engine thus both having
LocalExpnIdwhich can be then used to properly emit diagnostic about unused target expression for list delegations.Third part of #156798, tests will be adjusted after #157601 is merged.
Part of #118212.
r? @petrochenkov