File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -156,11 +156,21 @@ pub enum BorrowKind {
156
156
/// decl, a let, etc.
157
157
#[ derive( Clone , Debug , RustcEncodable , RustcDecodable ) ]
158
158
pub struct VarDecl < ' tcx > {
159
+ /// `let mut x` vs `let x`
159
160
pub mutability : Mutability ,
161
+
162
+ /// name that user gave the variable; not that, internally,
163
+ /// mir references variables by index
160
164
pub name : Name ,
165
+
166
+ /// type inferred for this variable (`let x: ty = ...`)
161
167
pub ty : Ty < ' tcx > ,
162
- pub scope : ScopeId , // scope in which variable was declared
163
- pub span : Span , // span where variable was declared
168
+
169
+ /// scope in which variable was declared
170
+ pub scope : ScopeId ,
171
+
172
+ /// span where variable was declared
173
+ pub span : Span ,
164
174
}
165
175
166
176
/// A "temp" is a temporary that we place on the stack. They are
You can’t perform that action at this time.
0 commit comments