is_closure_like
This commit is contained in:
@@ -115,6 +115,12 @@ pub enum DefKind {
|
||||
Impl {
|
||||
of_trait: bool,
|
||||
},
|
||||
/// A closure, coroutine, or coroutine-closure.
|
||||
///
|
||||
/// These are all represented with the same `ExprKind::Closure` in the AST and HIR,
|
||||
/// which makes it difficult to distinguish these during def collection. Therefore,
|
||||
/// we treat them all the same, and code which needs to distinguish them can match
|
||||
/// or `hir::ClosureKind` or `type_of`.
|
||||
Closure,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user