Skip to content

Commit

Permalink
Merge pull request #330 from KisaragiEffective/feat/types/split-ref-a…
Browse files Browse the repository at this point in the history
…nd-ptr
  • Loading branch information
KisaragiEffective authored Dec 20, 2023
2 parents daa964e + c5a2891 commit 55c9879
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions package/origlang-typesystem-model/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,17 @@ pub enum Type {
#[display(fmt = "{_0}")]
Record(DisplayRecordType),
#[display(fmt = "*const {_0}")]
Ref(Box<Self>),
Ptr(Box<Self>),
#[display(fmt = "*mut {_0}")]
RefMut(Box<Self>)
PtrMut(Box<Self>),
/// same as [`Self::Ptr`], but requires to be properly aligned and not to be null even if
/// value of this type is never dereferenced.
#[display(fmt = "&{_0}")]
Ref(Box<Self>),
/// same as [`Self::PtrMut`], but requires to be properly aligned and not to be null even if
/// value of this type is never dereferenced.
#[display(fmt = "&mut {_0}")]
RefMut(Box<Self>),
}

impl Type {
Expand Down

0 comments on commit 55c9879

Please sign in to comment.