Skip to content

Commit 3d881b7

Browse files
authored
Merge pull request #146 from leodasvacas/some-docs-for-UniverseIndex
Some docs for `UniverseIndex`
2 parents e7a16df + 5967b19 commit 3d881b7

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/ir.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,13 @@ impl TypeName {
153153
}
154154
}
155155

156+
/// An universe index is how a universally quantified parameter is
157+
/// represented when it's binder is moved into the environment.
158+
/// An example chain of transformations would be:
159+
/// `forall<T> { Goal(T) }` (syntatical representation)
160+
/// `forall { Goal(?0) }` (used a DeBruijn index)
161+
/// `Goal(!U1)` (the quantifier was moved to the environment and replaced with a universe index)
162+
/// See https://rust-lang-nursery.github.io/rustc-guide/mir/regionck.html#skol for more.
156163
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
157164
pub struct UniverseIndex {
158165
crate counter: usize,

0 commit comments

Comments
 (0)