Struct rustc_typeck::hir::def::PathResolution
[−]
[src]
pub struct PathResolution { pub base_def: Def, pub depth: usize, }
Unstable (
rustc_private
)The result of resolving a path.
Before type checking completes, depth
represents the number of
trailing segments which are yet unresolved. Afterwards, if there
were no errors, all paths should be fully resolved, with depth
set to 0
and base_def
representing the final resolution.
module::Type::AssocX::AssocY::MethodOrAssocType ^~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ base_def depth = 3 <T as Trait>::AssocX::AssocY::MethodOrAssocType ^~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~ base_def depth = 2
Fields
base_def: Def
Unstable (
rustc_private
)depth: usize
Unstable (
rustc_private
)Methods
impl PathResolution
fn full_def(&self) -> Def
Unstable (
rustc_private
)Get the definition, if fully resolved, otherwise panic.
fn def_id(&self) -> DefId
Unstable (
rustc_private
)Get the DefId, if fully resolved, otherwise panic.
fn new(base_def: Def, depth: usize) -> PathResolution
Trait Implementations
Derived Implementations
impl Debug for PathResolution
fn fmt(&self, __arg_0: &mut Formatter) -> Result<(), Error>
Formats the value using the given formatter.
impl Clone for PathResolution
fn clone(&self) -> PathResolution
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more