[−][src]Struct rustc_mir_build::build::scope::Scopes
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]
&mut self,
region_scope: (Scope, SourceInfo),
vis_scope: SourceScope
)
fn pop_scope(
&mut self,
region_scope: (Scope, SourceInfo)
) -> (Scope, Option<BasicBlock>)[src]
&mut self,
region_scope: (Scope, SourceInfo)
) -> (Scope, Option<BasicBlock>)
fn may_panic(&self, scope_count: usize) -> bool[src]
fn find_breakable_scope(
&self,
span: Span,
target: BreakableTarget
) -> (BasicBlock, Scope, Option<Place<'tcx>>)[src]
&self,
span: Span,
target: BreakableTarget
) -> (BasicBlock, Scope, Option<Place<'tcx>>)
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]
&mut self,
count: usize
) -> impl DoubleEndedIterator<Item = &mut Scope> + '_
pub(super) fn topmost(
&self
) -> Scope[src]
&self
) -> Scope
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
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<'a, T> Captures<'a> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,