Trait rustc::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
impl<'a, 'tcx> RegionScope for InferCtxt<'a, 'tcx>impl RegionScope for ExplicitRscopeimpl RegionScope for UnelidableRscopeimpl RegionScope for SpecificRscopeimpl RegionScope for BindingRscopeimpl<'r> RegionScope for ShiftedRscope<'r>