Skip to main content

charon_lib/ast/type_level/
regions.rs

1use crate::ast::*;
2use derive_generic_visitor::*;
3use macros::{EnumAsGetters, EnumIsA};
4use serde_state::{DeserializeState, SerializeState};
5
6#[derive(
7    Debug,
8    PartialEq,
9    Eq,
10    Copy,
11    Clone,
12    Hash,
13    PartialOrd,
14    Ord,
15    EnumIsA,
16    EnumAsGetters,
17    SerializeState,
18    DeserializeState,
19    Drive,
20    DriveMut,
21    DriveTwo,
22)]
23#[cfg_attr(feature = "charon_on_charon", charon::variants_prefix("R"))]
24pub enum Region {
25    /// Region variable. See `DeBruijnVar` for details.
26    Var(RegionDbVar),
27    /// Static region
28    Static,
29    /// Body-local region, considered existentially-bound at the level of a body.
30    Body(RegionId),
31    /// Erased region
32    Erased,
33}