Skip to content

Commit ab8fa49

Browse files
committed
some (very little) work on commenting
1 parent dd37c0a commit ab8fa49

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/rustc/middle/borrowck/categorization.rs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,15 @@ determine what kind of memory is used in evaluating it (for example,
77
where dereferences occur and what kind of pointer is dereferenced;
88
whether the memory is mutable; etc)
99
10-
10+
Categorization effectively transforms all of our expressions into
11+
expressions of the following forms (the actual enum has many more
12+
possibilities, naturally, but they are all variants of these base
13+
forms):
14+
15+
E = rvalue // some computed rvalue
16+
| x // address of a local variable, arg, or upvar
17+
| *E // deref of a ptr
18+
| E.comp // access to an interior component
1119
1220
Imagine a routine ToAddr(Expr) that evaluates an expression and returns an
1321
address where the result is to be found. If Expr is an lvalue, then this

0 commit comments

Comments
 (0)