Struct rustc_trans::middle::infer::region_inference::SameRegionsUnstable [-] [+] [src]

pub struct SameRegions {
    pub scope_id: u32,
    pub regions: Vec<BoundRegion>,
}

SameRegions is used to group regions that we think are the same and would like to indicate so to the user. For example, the following function struct Foo { bar: int } fn foo2<'a, 'b>(x: &'a Foo) -> &'b int { &x.bar } would report an error because we expect 'a and 'b to match, and so we group 'a and 'b together inside a SameRegions struct

Fields

scope_id
regions

Methods

impl SameRegions

fn contains(&self, other: &BoundRegion) -> bool

fn push(&mut self, other: BoundRegion)

Trait Implementations

Derived Implementations

impl Debug for SameRegions

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

impl Clone for SameRegions

fn clone(&self) -> SameRegions

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