Struct rustc_trans::middle::def::PathResolutionUnstable [-] [+] [src]

pub struct PathResolution {
    pub base_def: Def,
    pub last_private: LastPrivate,
    pub depth: usize,
}

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
last_private
depth

Methods

impl PathResolution

fn full_def(&self) -> Def

Get the definition, if fully resolved, otherwise panic.

fn def_id(&self) -> DefId

Get the DefId, if fully resolved, otherwise panic.

fn new(base_def: Def, last_private: LastPrivate, depth: usize) -> PathResolution

Trait Implementations

Derived Implementations

impl Debug for PathResolution

fn fmt(&self, __arg_0: &mut Formatter) -> Result<(), Error>

impl Clone for PathResolution

fn clone(&self) -> PathResolution

fn clone_from(&mut self, source: &Self)

impl Copy for PathResolution