File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -126,26 +126,24 @@ pub enum TyKind<'tcx> {
126126 Ref ( Region < ' tcx > , Ty < ' tcx > , hir:: Mutability ) ,
127127
128128 /// The anonymous type of a function declaration/definition. Each
129- /// function has a unique type.
129+ /// function has a unique type, which is output (for a function
130+ /// named `foo` returning an `i32`) as `fn() -> i32 {foo}`.
130131 ///
131- /// For example the type of `a ` here:
132+ /// For example the type of `bar ` here:
132133 ///
133134 /// ```rust
134135 /// fn foo() -> i32 { 1 }
135- ///
136- /// fn hello() {
137- /// let a = foo;
138- /// }
136+ /// let bar = foo; // bar: fn() -> i32 {foo}
139137 /// ```
140138 FnDef ( DefId , & ' tcx Substs < ' tcx > ) ,
141139
142140 /// A pointer to a function. Written as `fn() -> i32`.
143141 ///
144- /// For example the type of `a ` here:
142+ /// For example the type of `bar ` here:
145143 ///
146144 /// ```rust
147145 /// fn foo() -> i32 { 1 }
148- /// let a : fn() -> i32 = foo;
146+ /// let bar : fn() -> i32 = foo;
149147 /// ```
150148 FnPtr ( PolyFnSig < ' tcx > ) ,
151149
You can’t perform that action at this time.
0 commit comments