pub(crate) trait ResolverAstLoweringExt {
fn legacy_const_generic_args(&self, expr: &Expr) -> Option<Vec<usize>>;
fn get_partial_res(&self, id: NodeId) -> Option<PartialRes>;
fn get_import_res(&self, id: NodeId) -> PerNS<Option<Res<NodeId>>>;
fn get_label_res(&self, id: NodeId) -> Option<NodeId>;
fn get_lifetime_res(&self, id: NodeId) -> Option<LifetimeRes>;
fn take_extra_lifetime_params(
&mut self,
id: NodeId
) -> Vec<(Ident, NodeId, LifetimeRes)>;
fn decl_macro_kind(&self, def_id: LocalDefId) -> MacroKind;
fn record_def_id_remap(&mut self, from: LocalDefId, to: LocalDefId);
fn get_remapped_def_id(&self, local_def_id: LocalDefId) -> LocalDefId;
}
Required Methods
fn get_partial_res(&self, id: NodeId) -> Option<PartialRes>
fn get_label_res(&self, id: NodeId) -> Option<NodeId>
fn get_lifetime_res(&self, id: NodeId) -> Option<LifetimeRes>
fn take_extra_lifetime_params(
&mut self,
id: NodeId
) -> Vec<(Ident, NodeId, LifetimeRes)>
fn decl_macro_kind(&self, def_id: LocalDefId) -> MacroKind
fn record_def_id_remap(&mut self, from: LocalDefId, to: LocalDefId)
fn record_def_id_remap(&mut self, from: LocalDefId, to: LocalDefId)
Record the map from from
local def id to to
local def id, on generics_def_id_map
field.
fn get_remapped_def_id(&self, local_def_id: LocalDefId) -> LocalDefId
fn get_remapped_def_id(&self, local_def_id: LocalDefId) -> LocalDefId
Get the previously recorded to
local def id given the from
local def id, obtained using
generics_def_id_map
field.
Implementations on Foreign Types
sourceimpl ResolverAstLoweringExt for ResolverAstLowering
impl ResolverAstLoweringExt for ResolverAstLowering
sourcefn get_partial_res(&self, id: NodeId) -> Option<PartialRes>
fn get_partial_res(&self, id: NodeId) -> Option<PartialRes>
Obtains resolution for a NodeId
with a single resolution.
sourcefn get_import_res(&self, id: NodeId) -> PerNS<Option<Res<NodeId>>>
fn get_import_res(&self, id: NodeId) -> PerNS<Option<Res<NodeId>>>
Obtains per-namespace resolutions for use
statement with the given NodeId
.
sourcefn get_label_res(&self, id: NodeId) -> Option<NodeId>
fn get_label_res(&self, id: NodeId) -> Option<NodeId>
Obtains resolution for a label with the given NodeId
.
sourcefn get_lifetime_res(&self, id: NodeId) -> Option<LifetimeRes>
fn get_lifetime_res(&self, id: NodeId) -> Option<LifetimeRes>
Obtains resolution for a lifetime with the given NodeId
.
sourcefn take_extra_lifetime_params(
&mut self,
id: NodeId
) -> Vec<(Ident, NodeId, LifetimeRes)>
fn take_extra_lifetime_params(
&mut self,
id: NodeId
) -> Vec<(Ident, NodeId, LifetimeRes)>
Obtain the list of lifetimes parameters to add to an item.
Extra lifetime parameters should only be added in places that can appear
as a binder
in LifetimeRes
.
The extra lifetimes that appear from the parenthesized Fn
-trait desugaring
should appear at the enclosing PolyTraitRef
.
sourcefn record_def_id_remap(&mut self, from: LocalDefId, to: LocalDefId)
fn record_def_id_remap(&mut self, from: LocalDefId, to: LocalDefId)
Push a remapping into the top-most map.
Panics if no map has been pushed.
Remapping is used when creating lowering -> impl Trait
return
types to create the resulting opaque type.