diff options
| author | ouz-a <ouz.agz@gmail.com> | 2023-09-21 12:18:10 +0300 |
|---|---|---|
| committer | ouz-a <ouz.agz@gmail.com> | 2023-09-28 11:19:51 +0300 |
| commit | d83559939cf89f717d1fcd8266c5f457df6e37dd (patch) | |
| tree | c5678992ff9095dc9f97d6fdec6ea525f1edbd80 /compiler/stable_mir/src/ty.rs | |
| parent | 5dc2214884483496ef8cf4a8fa7f1be189669974 (diff) | |
| download | rust-d83559939cf89f717d1fcd8266c5f457df6e37dd.tar.gz rust-d83559939cf89f717d1fcd8266c5f457df6e37dd.zip | |
make reg public and add visit, fold
Diffstat (limited to 'compiler/stable_mir/src/ty.rs')
| -rw-r--r-- | compiler/stable_mir/src/ty.rs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/compiler/stable_mir/src/ty.rs b/compiler/stable_mir/src/ty.rs index a47621337f0..d05fa4a2ed4 100644 --- a/compiler/stable_mir/src/ty.rs +++ b/compiler/stable_mir/src/ty.rs @@ -34,10 +34,13 @@ pub struct Const { } type Ident = Opaque; -pub(crate) struct Region { + +#[derive(Debug, Clone)] +pub struct Region { pub kind: RegionKind, } +#[derive(Debug, Clone)] pub enum RegionKind { ReEarlyBound(EarlyBoundRegion), ReLateBound(DebruijnIndex, BoundRegion), @@ -51,6 +54,7 @@ pub enum RegionKind { pub(crate) type DebruijnIndex = u32; +#[derive(Debug, Clone)] pub struct EarlyBoundRegion { pub def_id: RegionDef, pub index: u32, @@ -59,11 +63,13 @@ pub struct EarlyBoundRegion { pub(crate) type BoundVar = u32; +#[derive(Debug, Clone)] pub struct BoundRegion { pub var: BoundVar, pub kind: BoundRegionKind, } +#[derive(Debug, Clone)] pub struct FreeRegion { pub scope: RegionDef, pub bound_region: BoundRegionKind, @@ -73,6 +79,7 @@ pub(crate) type RegionVid = u32; pub(crate) type UniverseIndex = u32; +#[derive(Debug, Clone)] pub struct Placeholder<T> { pub universe: UniverseIndex, pub bound: T, |
