Box ExprKind::{Closure,MethodCall}, and QSelf in expressions, types, and patterns.
This commit is contained in:
@@ -262,11 +262,11 @@ impl<'a, 'b> visit::Visitor<'a> for DefCollector<'a, 'b> {
|
||||
fn visit_expr(&mut self, expr: &'a Expr) {
|
||||
let parent_def = match expr.kind {
|
||||
ExprKind::MacCall(..) => return self.visit_macro_invoc(expr.id),
|
||||
ExprKind::Closure(_, _, asyncness, ..) => {
|
||||
ExprKind::Closure(ref closure) => {
|
||||
// Async closures desugar to closures inside of closures, so
|
||||
// we must create two defs.
|
||||
let closure_def = self.create_def(expr.id, DefPathData::ClosureExpr, expr.span);
|
||||
match asyncness {
|
||||
match closure.asyncness {
|
||||
Async::Yes { closure_id, .. } => {
|
||||
self.create_def(closure_id, DefPathData::ClosureExpr, expr.span)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user