File tree 1 file changed +6
-8
lines changed
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> {
126
126
Ref ( Region < ' tcx > , Ty < ' tcx > , hir:: Mutability ) ,
127
127
128
128
/// 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}`.
130
131
///
131
- /// For example the type of `a ` here:
132
+ /// For example the type of `bar ` here:
132
133
///
133
134
/// ```rust
134
135
/// fn foo() -> i32 { 1 }
135
- ///
136
- /// fn hello() {
137
- /// let a = foo;
138
- /// }
136
+ /// let bar = foo; // bar: fn() -> i32 {foo}
139
137
/// ```
140
138
FnDef ( DefId , & ' tcx Substs < ' tcx > ) ,
141
139
142
140
/// A pointer to a function. Written as `fn() -> i32`.
143
141
///
144
- /// For example the type of `a ` here:
142
+ /// For example the type of `bar ` here:
145
143
///
146
144
/// ```rust
147
145
/// fn foo() -> i32 { 1 }
148
- /// let a : fn() -> i32 = foo;
146
+ /// let bar : fn() -> i32 = foo;
149
147
/// ```
150
148
FnPtr ( PolyFnSig < ' tcx > ) ,
151
149
You can’t perform that action at this time.
0 commit comments