diff --git a/src/rustc/middle/borrowck/categorization.rs b/src/rustc/middle/borrowck/categorization.rs index c7103b6899c4..ff9d51196c91 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