pub(crate) enum Scope<'a> {
Implicit {
kind: BinderKind,
node_id: NodeId,
params: &'a [RefineParam],
},
Explicit(&'a [RefineParam]),
Opaque,
}Expand description
A scope opened while walking an item. Params are only ever defined when entering the scope that declares them.
Variants§
Implicit
A binder with implicitly scoped params (declared with @n, #n, x: T, &strg x).
The scope can also declare explicit params, e.g., fn foo[n: int](...).
Explicit(&'a [RefineParam])
A scope declaring explicit params, e.g., exists<a: int> ..., |x| ... or
forall i in 0..n { ... }.
Opaque
A scope that declares no params. It only prevents binders inside it from being bound in an
enclosing binder scope, e.g., @n is illegal in Vec<i32[@n]>.
Auto Trait Implementations§
impl<'a> DynSend for Scope<'a>
impl<'a> DynSync for Scope<'a>
impl<'a> Freeze for Scope<'a>
impl<'a> RefUnwindSafe for Scope<'a>
impl<'a> Send for Scope<'a>
impl<'a> Sync for Scope<'a>
impl<'a> Unpin for Scope<'a>
impl<'a> UnsafeUnpin for Scope<'a>
impl<'a> UnwindSafe for Scope<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more