]> git.lizzy.rs Git - rust.git/commitdiff
Address nit: use doc-comments for fields of VarDecl
authorNiko Matsakis <niko@alum.mit.edu>
Wed, 23 Mar 2016 08:21:02 +0000 (04:21 -0400)
committerNiko Matsakis <niko@alum.mit.edu>
Wed, 23 Mar 2016 20:42:53 +0000 (16:42 -0400)
src/librustc/mir/repr.rs

index a1688e1464c5a19be593a6c71882aa2c81655511..2931af2936f5187989704e07da3b275bf5ba08c3 100644 (file)
@@ -156,11 +156,21 @@ pub enum BorrowKind {
 /// decl, a let, etc.
 #[derive(Clone, Debug, RustcEncodable, RustcDecodable)]
 pub struct VarDecl<'tcx> {
+    /// `let mut x` vs `let x`
     pub mutability: Mutability,
+
+    /// name that user gave the variable; not that, internally,
+    /// mir references variables by index
     pub name: Name,
+
+    /// type inferred for this variable (`let x: ty = ...`)
     pub ty: Ty<'tcx>,
-    pub scope: ScopeId, // scope in which variable was declared
-    pub span: Span, // span where variable was declared
+
+    /// scope in which variable was declared
+    pub scope: ScopeId,
+
+    /// span where variable was declared
+    pub span: Span,
 }
 
 /// A "temp" is a temporary that we place on the stack. They are