From ecd10f04cea34352ff240b0462d40cd1d95a4e0f Mon Sep 17 00:00:00 2001 From: Niko Matsakis Date: Wed, 20 Apr 2016 14:44:07 -0400 Subject: thread tighter span for closures around Track the span corresponding to the `|...|` part of the closure. --- src/libsyntax/ast.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/libsyntax/ast.rs') diff --git a/src/libsyntax/ast.rs b/src/libsyntax/ast.rs index df9f935446d..dc59d475286 100644 --- a/src/libsyntax/ast.rs +++ b/src/libsyntax/ast.rs @@ -986,7 +986,9 @@ pub enum ExprKind { /// A `match` block. Match(P, Vec), /// A closure (for example, `move |a, b, c| {a + b + c}`) - Closure(CaptureBy, P, P), + /// + /// The final span is the span of the argument block `|...|` + Closure(CaptureBy, P, P, Span), /// A block (`{ ... }`) Block(P), -- cgit 1.4.1-3-g733a5