[−][src]Struct rustc_mir_build::build::scope::Scopes

pub(crate) struct Scopes<'tcx> {
    scopes: Vec<Scope>,
    breakable_scopes: Vec<BreakableScope<'tcx>>,
}

Fields

scopes: Vec<Scope>breakable_scopes: Vec<BreakableScope<'tcx>>

The current set of breakable scopes. See module comment for more details.

Implementations

impl<'tcx> Scopes<'tcx>[src]

fn len(&self) -> usize[src]

fn push_scope(
    &mut self,
    region_scope: (Scope, SourceInfo),
    vis_scope: SourceScope
)
[src]

fn pop_scope(
    &mut self,
    region_scope: (Scope, SourceInfo)
) -> (Scope, Option<BasicBlock>)
[src]

fn may_panic(&self, scope_count: usize) -> bool[src]

fn find_breakable_scope(
    &self,
    span: Span,
    target: BreakableTarget
) -> (BasicBlock, Scope, Option<Place<'tcx>>)
[src]

Finds the breakable scope for a given label. This is used for resolving return, break and continue.

fn num_scopes_above(&self, region_scope: Scope, span: Span) -> usize[src]

fn iter_mut(&mut self) -> impl DoubleEndedIterator<Item = &mut Scope> + '_[src]

fn top_scopes(
    &mut self,
    count: usize
) -> impl DoubleEndedIterator<Item = &mut Scope> + '_
[src]

pub(super) fn topmost(
    &self
) -> Scope
[src]

Returns the topmost active scope, which is known to be alive until the next scope expression.

fn source_info(&self, index: usize, span: Span) -> SourceInfo[src]

Trait Implementations

impl<'tcx> Debug for Scopes<'tcx>[src]

impl<'tcx> Default for Scopes<'tcx>[src]

Auto Trait Implementations

impl<'tcx> !RefUnwindSafe for Scopes<'tcx>

impl<'tcx> !Send for Scopes<'tcx>

impl<'tcx> !Sync for Scopes<'tcx>

impl<'tcx> Unpin for Scopes<'tcx>

impl<'tcx> !UnwindSafe for Scopes<'tcx>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized, 
[src]

impl<T> Borrow<T> for T where
    T: ?Sized, 
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized, 
[src]

impl<'a, T> Captures<'a> for T where
    T: ?Sized, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.