Struct rustc::hir::map::definitions::Definitions
[−]
[src]
pub struct Definitions { /* fields omitted */ }
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
The definition table containing node definitions. It holds the DefPathTable for local DefIds/DefPaths and it also stores a mapping from NodeIds to local DefIds.
Methods
impl Definitions
[src]
pub fn new() -> Definitions
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Create new empty definition map.
pub fn def_path_table(&self) -> &DefPathTable
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn def_index_counts_lo_hi(&self) -> (usize, usize)
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Get the number of definitions.
pub fn def_key(&self, index: DefIndex) -> DefKey
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn def_path_hash(&self, index: DefIndex) -> DefPathHash
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn def_path(&self, index: DefIndex) -> DefPath
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Returns the path from the crate root to index
. The root
nodes are not included in the path (i.e., this will be an
empty vector for the crate root). For an inlined item, this
will be the path of the item in the external crate (but the
path will begin with the path to the external crate).
pub fn opt_def_index(&self, node: NodeId) -> Option<DefIndex>
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn opt_local_def_id(&self, node: NodeId) -> Option<DefId>
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn local_def_id(&self, node: NodeId) -> DefId
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn as_local_node_id(&self, def_id: DefId) -> Option<NodeId>
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn node_to_hir_id(&self, node_id: NodeId) -> HirId
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn find_node_for_hir_id(&self, hir_id: HirId) -> NodeId
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn def_index_to_hir_id(&self, def_index: DefIndex) -> HirId
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn create_root_def(
&mut self,
crate_name: &str,
crate_disambiguator: CrateDisambiguator
) -> DefIndex
[src]
&mut self,
crate_name: &str,
crate_disambiguator: CrateDisambiguator
) -> DefIndex
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Add a definition with a parent definition.
pub fn create_def_with_parent(
&mut self,
parent: DefIndex,
node_id: NodeId,
data: DefPathData,
address_space: DefIndexAddressSpace,
expansion: Mark
) -> DefIndex
[src]
&mut self,
parent: DefIndex,
node_id: NodeId,
data: DefPathData,
address_space: DefIndexAddressSpace,
expansion: Mark
) -> DefIndex
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Add a definition with a parent definition.
pub fn init_node_id_to_hir_id_mapping(
&mut self,
mapping: IndexVec<NodeId, HirId>
)
[src]
&mut self,
mapping: IndexVec<NodeId, HirId>
)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Initialize the ast::NodeId to HirId mapping once it has been generated during AST to HIR lowering.
pub fn expansion(&self, index: DefIndex) -> Mark
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn macro_def_scope(&self, mark: Mark) -> DefId
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn add_macro_def_scope(&mut self, mark: Mark, scope: DefId)
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?