Trait rustc_trans::middle::typeck::rscope::RegionScopeExperimental [-]  [+] [src]

pub trait RegionScope {
    fn anon_regions(&self, span: Span, count: uint) -> Result<Vec<Region>, Option<Vec<(String, uint)>>>;
    fn default_region_bound(&self, span: Span) -> Option<Region>;
}

Defines strategies for handling regions that are omitted. For example, if one writes the type &Foo, then the lifetime of this reference has been omitted. When converting this type, the generic functions in astconv will invoke anon_regions on the provided region-scope to decide how to translate this omitted region.

It is not always legal to omit regions, therefore anon_regions can return Err(()) to indicate that this is not a scope in which regions can legally be omitted.

Required Methods

fn anon_regions(&self, span: Span, count: uint) -> Result<Vec<Region>, Option<Vec<(String, uint)>>>

fn default_region_bound(&self, span: Span) -> Option<Region>

Implementors