Implement def_id based remapping
This commit is contained in:
parent
f0db1d68e6
commit
1d6cebfd6b
3 changed files with 135 additions and 102 deletions
|
@ -913,6 +913,8 @@ pub struct Resolver<'a> {
|
|||
label_res_map: NodeMap<NodeId>,
|
||||
/// Resolutions for lifetimes.
|
||||
lifetimes_res_map: NodeMap<LifetimeRes>,
|
||||
/// Mapping from generics def-id to RPIT copied generic def-id
|
||||
generics_def_id_map: Vec<FxHashMap<LocalDefId, LocalDefId>>,
|
||||
/// Lifetime parameters that lowering will have to introduce.
|
||||
extra_lifetime_params_map: NodeMap<Vec<(Ident, NodeId, LifetimeRes)>>,
|
||||
|
||||
|
@ -1277,6 +1279,7 @@ impl<'a> Resolver<'a> {
|
|||
import_res_map: Default::default(),
|
||||
label_res_map: Default::default(),
|
||||
lifetimes_res_map: Default::default(),
|
||||
generics_def_id_map: Vec::new(),
|
||||
extra_lifetime_params_map: Default::default(),
|
||||
extern_crate_map: Default::default(),
|
||||
reexport_map: FxHashMap::default(),
|
||||
|
@ -1444,6 +1447,7 @@ impl<'a> Resolver<'a> {
|
|||
import_res_map: self.import_res_map,
|
||||
label_res_map: self.label_res_map,
|
||||
lifetimes_res_map: self.lifetimes_res_map,
|
||||
generics_def_id_map: self.generics_def_id_map,
|
||||
extra_lifetime_params_map: self.extra_lifetime_params_map,
|
||||
next_node_id: self.next_node_id,
|
||||
node_id_to_def_id: self.node_id_to_def_id,
|
||||
|
@ -1488,6 +1492,7 @@ impl<'a> Resolver<'a> {
|
|||
import_res_map: self.import_res_map.clone(),
|
||||
label_res_map: self.label_res_map.clone(),
|
||||
lifetimes_res_map: self.lifetimes_res_map.clone(),
|
||||
generics_def_id_map: self.generics_def_id_map.clone(),
|
||||
extra_lifetime_params_map: self.extra_lifetime_params_map.clone(),
|
||||
next_node_id: self.next_node_id.clone(),
|
||||
node_id_to_def_id: self.node_id_to_def_id.clone(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue