]> git.lizzy.rs Git - rust.git/commitdiff
add comments on remaining fields
authorNiko Matsakis <niko@alum.mit.edu>
Wed, 23 Mar 2016 09:18:49 +0000 (05:18 -0400)
committerNiko Matsakis <niko@alum.mit.edu>
Wed, 23 Mar 2016 20:42:54 +0000 (16:42 -0400)
src/librustc_mir/build/scope.rs

index 00d517cc255a7d3f8d78ca3b1b34dd8c1f6c5928..cc9a4c4e7144bd9ef8ad837fb59777a282d68244 100644 (file)
 pub struct Scope<'tcx> {
     /// the scope-id within the scope_datas
     id: ScopeId,
+
+    /// the extent of this scope within source code; also stored in
+    /// `ScopeAuxiliary`, but kept here for convenience
     extent: CodeExtent,
+
+    /// set of lvalues to drop when exiting this scope. This starts
+    /// out empty but grows as variables are declared during the
+    /// building process. This is a stack, so we always drop from the
+    /// end of the vector (top of the stack) first.
     drops: Vec<DropData<'tcx>>,
 
     /// A scope may only have one associated free, because: