diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2016-03-23 04:21:02 -0400 |
|---|---|---|
| committer | Niko Matsakis <niko@alum.mit.edu> | 2016-03-23 16:42:53 -0400 |
| commit | a2bab6f3e1f8b830b311e30a5a154a351a29e001 (patch) | |
| tree | 99b735cf7d426b74594576ed702c11d69aac18f3 | |
| parent | 14a5657a9a22580aecdbcd72fdea35e4c30f36a5 (diff) | |
| download | rust-a2bab6f3e1f8b830b311e30a5a154a351a29e001.tar.gz rust-a2bab6f3e1f8b830b311e30a5a154a351a29e001.zip | |
Address nit: use doc-comments for fields of VarDecl
| -rw-r--r-- | src/librustc/mir/repr.rs | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/librustc/mir/repr.rs b/src/librustc/mir/repr.rs index a1688e1464c..2931af2936f 100644 --- a/src/librustc/mir/repr.rs +++ b/src/librustc/mir/repr.rs @@ -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 |
