Skip to content

Commit a2bab6f

Browse files
committed
Address nit: use doc-comments for fields of VarDecl
1 parent 14a5657 commit a2bab6f

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

src/librustc/mir/repr.rs

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,11 +156,21 @@ pub enum BorrowKind {
156156
/// decl, a let, etc.
157157
#[derive(Clone, Debug, RustcEncodable, RustcDecodable)]
158158
pub struct VarDecl<'tcx> {
159+
/// `let mut x` vs `let x`
159160
pub mutability: Mutability,
161+
162+
/// name that user gave the variable; not that, internally,
163+
/// mir references variables by index
160164
pub name: Name,
165+
166+
/// type inferred for this variable (`let x: ty = ...`)
161167
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,
164174
}
165175

166176
/// A "temp" is a temporary that we place on the stack. They are

0 commit comments

Comments
 (0)