Struct rustc_trans::middle::ty::MethodCallUnstable [-] [+] [src]

pub struct MethodCall {
    pub expr_id: u32,
    pub autoderef: u32,
}

With method calls, we store some extra information in side tables (i.e method_map). We use MethodCall as a key to index into these tables instead of just directly using the expression's NodeId. The reason for this being that we may apply adjustments (coercions) with the resulting expression also needing to use the side tables. The problem with this is that we don't assign a separate NodeId to this new expression and so it would clash with the base expression if both needed to add to the side tables. Thus to disambiguate we also keep track of whether there's an adjustment in our key.

Fields

expr_id
autoderef

Methods

impl MethodCall

fn expr(id: u32) -> MethodCall

fn autoderef(expr_id: u32, autoderef: u32) -> MethodCall

Trait Implementations

Derived Implementations

impl Debug for MethodCall

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

impl Hash for MethodCall

fn hash<__H>(&self, __arg_0: &mut __H) where __H: Hasher

fn hash_slice<H>(data: &[Self], state: &mut H) where H: Hasher

impl Eq for MethodCall

impl PartialEq<MethodCall> for MethodCall

fn eq(&self, __arg_0: &MethodCall) -> bool

fn ne(&self, __arg_0: &MethodCall) -> bool

impl Copy for MethodCall

impl Clone for MethodCall

fn clone(&self) -> MethodCall

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