Type Definition rustc_middle::dep_graph::DepNode
source · Trait Implementations§
source§impl DepNodeExt for DepNode
impl DepNodeExt for DepNode
source§fn extract_def_id<'tcx>(&self, tcx: TyCtxt<'tcx>) -> Option<DefId>
fn extract_def_id<'tcx>(&self, tcx: TyCtxt<'tcx>) -> Option<DefId>
Extracts the DefId corresponding to this DepNode. This will work if two conditions are met:
- The Fingerprint of the DepNode actually is a DefPathHash, and
- the item that the DefPath refers to exists in the current tcx.
Condition (1) is determined by the DepKind variant of the DepNode. Condition (2) might not be fulfilled if a DepNode refers to something from the previous compilation session that has been removed.
source§fn from_label_string(
tcx: TyCtxt<'_>,
label: &str,
def_path_hash: DefPathHash
) -> Result<DepNode, ()>
fn from_label_string(
tcx: TyCtxt<'_>,
label: &str,
def_path_hash: DefPathHash
) -> Result<DepNode, ()>
Used in testing
source§fn has_label_string(label: &str) -> bool
fn has_label_string(label: &str) -> bool
Used in testing
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.
Size: 18 bytes