We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
TyKind::FnDef
TyKind::FnPtr
1 parent 6622172 commit 4d58821Copy full SHA for 4d58821
src/librustc/ty/sty.rs
@@ -127,9 +127,26 @@ pub enum TyKind<'tcx> {
127
128
/// The anonymous type of a function declaration/definition. Each
129
/// function has a unique type.
130
+ ///
131
+ /// For example the type of `a` here:
132
133
+ /// ```rust
134
+ /// fn foo() -> i32 { 1 }
135
136
+ /// fn hello() {
137
+ /// let a = foo;
138
+ /// }
139
+ /// ```
140
FnDef(DefId, &'tcx Substs<'tcx>),
141
142
/// A pointer to a function. Written as `fn() -> i32`.
143
144
145
146
147
148
+ /// let a: fn() -> i32 = foo;
149
150
FnPtr(PolyFnSig<'tcx>),
151
152
/// A trait, defined with `trait`.
0 commit comments