Struct rustc_lint::middle::region::RegionMapsUnstable [-] [+] [src]

pub struct RegionMaps {
    // some fields omitted
}

The region maps encode information about region relationships.

Methods

impl RegionMaps

fn each_encl_scope<E>(&self, e: E) where E: FnMut(&CodeExtent, &CodeExtent) -> ()

fn each_var_scope<E>(&self, e: E) where E: FnMut(&u32, &CodeExtent) -> ()

fn each_rvalue_scope<E>(&self, e: E) where E: FnMut(&u32, &CodeExtent) -> ()

fn each_terminating_scope<E>(&self, e: E) where E: FnMut(&CodeExtent) -> ()

fn record_encl_scope(&self, sub: CodeExtent, sup: CodeExtent)

fn opt_encl_scope(&self, id: CodeExtent) -> Option<CodeExtent>

Returns the narrowest scope that encloses id, if any.

fn encl_scope(&self, id: CodeExtent) -> CodeExtent

Returns the narrowest scope that encloses id, if any.

fn var_scope(&self, var_id: u32) -> CodeExtent

Returns the lifetime of the local variable var_id

fn temporary_scope(&self, expr_id: u32) -> Option<CodeExtent>

Returns the scope when temp created by expr_id will be cleaned up

fn var_region(&self, id: u32) -> Region

Returns the lifetime of the variable id.

fn scopes_intersect(&self, scope1: CodeExtent, scope2: CodeExtent) -> bool

fn is_subscope_of(&self, subscope: CodeExtent, superscope: CodeExtent) -> bool

Returns true if subscope is equal to or is lexically nested inside superscope and false otherwise.

fn nearest_common_ancestor(&self, scope_a: CodeExtent, scope_b: CodeExtent) -> CodeExtent

Finds the nearest common ancestor (if any) of two scopes. That is, finds the smallest scope which is greater than or equal to both scope_a and scope_b.