about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNiko Matsakis <niko@alum.mit.edu>2012-06-05 16:01:14 -0700
committerNiko Matsakis <niko@alum.mit.edu>2012-06-06 18:42:09 -0700
commitab8fa495d08f64c5a82bc8ed39f9e2066aec4b6b (patch)
tree46b6a92046d5b3b91b88dcda3403ba717edc41da
parentdd37c0a41e3c695886fb2f3c33f7fee6675822aa (diff)
downloadrust-ab8fa495d08f64c5a82bc8ed39f9e2066aec4b6b.tar.gz
rust-ab8fa495d08f64c5a82bc8ed39f9e2066aec4b6b.zip
some (very little) work on commenting
-rw-r--r--src/rustc/middle/borrowck/categorization.rs10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/rustc/middle/borrowck/categorization.rs b/src/rustc/middle/borrowck/categorization.rs
index c7103b6899c..ff9d51196c9 100644
--- a/src/rustc/middle/borrowck/categorization.rs
+++ b/src/rustc/middle/borrowck/categorization.rs
@@ -7,7 +7,15 @@ determine what kind of memory is used in evaluating it (for example,
 where dereferences occur and what kind of pointer is dereferenced;
 whether the memory is mutable; etc)
 
-
+Categorization effectively transforms all of our expressions into
+expressions of the following forms (the actual enum has many more
+possibilities, naturally, but they are all variants of these base
+forms):
+
+    E = rvalue    // some computed rvalue
+      | x         // address of a local variable, arg, or upvar
+      | *E        // deref of a ptr
+      | E.comp    // access to an interior component
 
 Imagine a routine ToAddr(Expr) that evaluates an expression and returns an
 address where the result is to be found.  If Expr is an lvalue, then this