From c30f068dc8b2ef58678b9846ba834dd6dea3fe44 Mon Sep 17 00:00:00 2001 From: Mazdak Farrokhzad Date: Thu, 30 Jan 2020 05:31:04 +0100 Subject: IsAsync -> enum Async { Yes { span: Span, .. }, No } use new span for better diagnostics. --- src/libsyntax/ast.rs | 26 +++++++++++++------------- src/libsyntax/mut_visit.rs | 10 +++++----- 2 files changed, 18 insertions(+), 18 deletions(-) (limited to 'src/libsyntax') diff --git a/src/libsyntax/ast.rs b/src/libsyntax/ast.rs index a7142dfda85..72430fa9c17 100644 --- a/src/libsyntax/ast.rs +++ b/src/libsyntax/ast.rs @@ -34,7 +34,7 @@ use rustc_data_structures::thin_vec::ThinVec; use rustc_index::vec::Idx; use rustc_macros::HashStable_Generic; use rustc_serialize::{self, Decoder, Encoder}; -use rustc_span::source_map::{dummy_spanned, respan, Spanned}; +use rustc_span::source_map::{respan, Spanned}; use rustc_span::symbol::{kw, sym, Symbol}; use rustc_span::{Span, DUMMY_SP}; @@ -1198,14 +1198,14 @@ pub enum ExprKind { /// A closure (e.g., `move |a, b, c| a + b + c`). /// /// The final span is the span of the argument block `|...|`. - Closure(CaptureBy, IsAsync, Movability, P, P, Span), + Closure(CaptureBy, Async, Movability, P, P, Span), /// A block (`'label: { ... }`). Block(P, Option