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]
impl Definitions
pub fn new() -> Definitions
[src]
pub fn new() -> Definitions
🔬 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]
pub fn def_path_table(&self) -> &DefPathTable
🔬 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]
pub fn def_index_counts_lo_hi(&self) -> (usize, usize)
🔬 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]
pub fn def_key(&self, index: DefIndex) -> DefKey
🔬 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]
pub fn def_path_hash(&self, index: DefIndex) -> DefPathHash
🔬 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]
pub fn def_path(&self, index: DefIndex) -> DefPath
🔬 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]
pub fn opt_def_index(&self, node: NodeId) -> Option<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?
pub fn opt_local_def_id(&self, node: NodeId) -> Option<DefId>
[src]
pub fn opt_local_def_id(&self, node: NodeId) -> Option<DefId>
🔬 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]
pub fn local_def_id(&self, node: NodeId) -> DefId
🔬 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]
pub fn as_local_node_id(&self, def_id: DefId) -> Option<NodeId>
🔬 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]
pub fn node_to_hir_id(&self, node_id: 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?
pub fn find_node_for_hir_id(&self, hir_id: HirId) -> NodeId
[src]
pub fn find_node_for_hir_id(&self, hir_id: HirId) -> NodeId
🔬 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]
pub fn def_index_to_hir_id(&self, def_index: DefIndex) -> 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?
pub fn opt_span(&self, def_id: DefId) -> Option<Span>
[src]
pub fn opt_span(&self, def_id: DefId) -> Option<Span>
🔬 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?
Retrieve the span of the given DefId
if DefId
is in the local crate, the span exists and
it's not DUMMY_SP
pub fn create_root_def(
&mut self,
crate_name: &str,
crate_disambiguator: CrateDisambiguator
) -> DefIndex
[src]
pub fn create_root_def(
&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,
span: Span
) -> DefIndex
[src]
pub fn create_def_with_parent(
&mut self,
parent: DefIndex,
node_id: NodeId,
data: DefPathData,
address_space: DefIndexAddressSpace,
expansion: Mark,
span: Span
) -> 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]
pub fn init_node_id_to_hir_id_mapping(
&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]
pub fn expansion(&self, index: DefIndex) -> Mark
🔬 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]
pub fn macro_def_scope(&self, mark: Mark) -> DefId
🔬 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]
pub fn add_macro_def_scope(&mut self, mark: Mark, scope: DefId)
🔬 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?
Trait Implementations
impl Clone for Definitions
[src]
impl Clone for Definitions
Auto Trait Implementations
impl !Send for Definitions
impl !Send for Definitions
impl !Sync for Definitions
impl !Sync for Definitions