Skip to main content

RegionDbVar

Type Alias RegionDbVar 

Source
pub type RegionDbVar = DeBruijnVar<RegionId>;

Aliased Type§

pub enum RegionDbVar {
    Bound(DeBruijnId, RegionId),
    Free(RegionId),
}

Variants§

§

Bound(DeBruijnId, RegionId)

A variable attached to the nth binder, counting from the innermost.

§

Free(RegionId)

A variable not attached to a particular binder. Can be used for various purposes which manipulating types, e.g. as inference variables or placeholders. If --unbind-item-vars is set, we use Free variables to refer to the item binders; Free variables should not otherwise be found in the output of running charon.

Trait Implementations§

Source§

impl<C: AstFormatter> FmtWithCtx<C> for RegionDbVar

Source§

fn fmt_with_ctx(&self, ctx: &C, f: &mut Formatter<'_>) -> Result

Source§

fn with_ctx<'a>(&'a self, ctx: &'a C) -> WithCtx<'a, C, Self>

Returns a struct that implements Display. This allows the following: Read more
Source§

fn to_string_with_ctx(&self, ctx: &C) -> String

Source§

impl TryFrom<Region> for RegionDbVar

Source§

type Error = ()

The type returned in the event of a conversion error.
Source§

fn try_from(e: Region) -> Result<Self, Self::Error>

Performs the conversion.