pub enum BoundVarLayerMap {
LayerMap(UnordMap<BoundVar, BoundVarName>),
FnRootLayerMap(FnRootLayerMap),
}
Variants§
LayerMap(UnordMap<BoundVar, BoundVarName>)
FnRootLayerMap(FnRootLayerMap)
We treat vars at the function root differently. The UnordMap functions the same as in a regular layer (i.e. giving names to anonymous bound vars), but we additionally track a set of boundvars that have been seen previously.
This set is used to render a signature like
fn(usize[@n], usize[n]) -> usize[#m] ensures m > 0
The first time we visit n
, we’ll add the @
, but the second
time we’ll track that we’ve seen it and won’t.
We do the same thing for m
but with a different layer.
This is a behavior we only do for bound vars at the fn root level.
Implementations§
Source§impl BoundVarLayerMap
impl BoundVarLayerMap
fn name_map(&self) -> &UnordMap<BoundVar, BoundVarName>
Trait Implementations§
Source§impl Clone for BoundVarLayerMap
impl Clone for BoundVarLayerMap
Source§fn clone(&self) -> BoundVarLayerMap
fn clone(&self) -> BoundVarLayerMap
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for BoundVarLayerMap
impl RefUnwindSafe for BoundVarLayerMap
impl Send for BoundVarLayerMap
impl Sync for BoundVarLayerMap
impl Unpin for BoundVarLayerMap
impl UnwindSafe for BoundVarLayerMap
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> 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