From 37cc2f5e1c3c0b0d9d043b6d54fa034a77350332 Mon Sep 17 00:00:00 2001 From: jeb Date: Tue, 21 Aug 2018 11:31:51 -0600 Subject: [PATCH] Update codegen for 2018-08-23 nightly. --- codegen/build.rs | 4 ++-- codegen/src/decorators/catch.rs | 2 +- codegen/src/decorators/derive_form.rs | 2 +- codegen/src/decorators/route.rs | 2 +- codegen/src/macros/mod.rs | 2 +- codegen/src/parser/catch.rs | 2 +- codegen/src/parser/function.rs | 2 +- codegen/src/parser/keyvalue.rs | 2 +- codegen/src/parser/param.rs | 2 +- codegen/src/parser/route.rs | 2 +- codegen/src/parser/uri.rs | 2 +- codegen/src/utils/mod.rs | 4 ++-- codegen/src/utils/span_ext.rs | 2 +- 13 files changed, 15 insertions(+), 15 deletions(-) diff --git a/codegen/build.rs b/codegen/build.rs index 6e57575c..b3403274 100644 --- a/codegen/build.rs +++ b/codegen/build.rs @@ -8,8 +8,8 @@ use yansi::Color::{Red, Yellow, Blue, White}; use version_check::{supports_features, is_min_version, is_min_date}; // Specifies the minimum nightly version needed to compile Rocket's codegen. -const MIN_DATE: &'static str = "2018-07-15"; -const MIN_VERSION: &'static str = "1.29.0-nightly"; +const MIN_DATE: &'static str = "2018-08-23"; +const MIN_VERSION: &'static str = "1.30.0-nightly"; fn main() { let ok_channel = supports_features(); diff --git a/codegen/src/decorators/catch.rs b/codegen/src/decorators/catch.rs index 861bb223..701afb88 100644 --- a/codegen/src/decorators/catch.rs +++ b/codegen/src/decorators/catch.rs @@ -2,7 +2,7 @@ use ::{CATCH_STRUCT_PREFIX, CATCH_FN_PREFIX, CATCHER_ATTR}; use parser::CatchParams; use utils::*; -use syntax::codemap::{Span}; +use syntax::source_map::{Span}; use syntax::ast::{MetaItem, Ident, TyKind}; use syntax::ext::base::{Annotatable, ExtCtxt}; use syntax::tokenstream::TokenTree; diff --git a/codegen/src/decorators/derive_form.rs b/codegen/src/decorators/derive_form.rs index 7f65e7de..ce5a1689 100644 --- a/codegen/src/decorators/derive_form.rs +++ b/codegen/src/decorators/derive_form.rs @@ -7,7 +7,7 @@ use syntax::ext::base::{Annotatable, ExtCtxt}; use syntax::print::pprust::{stmt_to_string}; use syntax::ast::{ItemKind, Expr, MetaItem, Mutability, VariantData, Ident}; use syntax::ast::{StructField, GenericParamKind}; -use syntax::codemap::Span; +use syntax::source_map::Span; use syntax::ext::build::AstBuilder; use syntax::ptr::P; diff --git a/codegen/src/decorators/route.rs b/codegen/src/decorators/route.rs index 239d046b..85e03fdc 100644 --- a/codegen/src/decorators/route.rs +++ b/codegen/src/decorators/route.rs @@ -6,7 +6,7 @@ use ::{ROUTE_ATTR, ROUTE_INFO_ATTR}; use parser::{Param, RouteParams}; use utils::*; -use syntax::codemap::{Span, Spanned}; +use syntax::source_map::{Span, Spanned}; use syntax::tokenstream::TokenTree; use syntax::ast::{Arg, Ident, Stmt, Expr, MetaItem, Path}; use syntax::ext::base::{Annotatable, ExtCtxt}; diff --git a/codegen/src/macros/mod.rs b/codegen/src/macros/mod.rs index 685a6899..f17728d4 100644 --- a/codegen/src/macros/mod.rs +++ b/codegen/src/macros/mod.rs @@ -1,7 +1,7 @@ use {ROUTE_STRUCT_PREFIX, CATCH_STRUCT_PREFIX}; use utils::{sep_by_tok, ParserExt, IdentExt}; -use syntax::codemap::Span; +use syntax::source_map::Span; use syntax::tokenstream::TokenTree; use syntax::ast::{Path, Expr}; use syntax::ext::base::{DummyResult, ExtCtxt, MacResult, MacEager}; diff --git a/codegen/src/parser/catch.rs b/codegen/src/parser/catch.rs index d46f7f77..016b7dc0 100644 --- a/codegen/src/parser/catch.rs +++ b/codegen/src/parser/catch.rs @@ -1,6 +1,6 @@ use syntax::ast::*; use syntax::ext::base::{ExtCtxt, Annotatable}; -use syntax::codemap::{Span, Spanned, dummy_spanned}; +use syntax::source_map::{Span, Spanned, dummy_spanned}; use rocket::http::Status; diff --git a/codegen/src/parser/function.rs b/codegen/src/parser/function.rs index c185a596..a9d02225 100644 --- a/codegen/src/parser/function.rs +++ b/codegen/src/parser/function.rs @@ -1,5 +1,5 @@ use syntax::ast::*; -use syntax::codemap::{Span, Spanned}; +use syntax::source_map::{Span, Spanned}; use syntax::ext::base::Annotatable; use utils::{ArgExt, span}; diff --git a/codegen/src/parser/keyvalue.rs b/codegen/src/parser/keyvalue.rs index af282712..1f3c65b3 100644 --- a/codegen/src/parser/keyvalue.rs +++ b/codegen/src/parser/keyvalue.rs @@ -1,4 +1,4 @@ -use syntax::codemap::{Spanned, Span, dummy_spanned, DUMMY_SP}; +use syntax::source_map::{Spanned, Span, dummy_spanned, DUMMY_SP}; use syntax::ext::base::ExtCtxt; use syntax::tokenstream::TokenTree; use syntax::ext::quote::rt::ToTokens; diff --git a/codegen/src/parser/param.rs b/codegen/src/parser/param.rs index 059d8128..a6bc9992 100644 --- a/codegen/src/parser/param.rs +++ b/codegen/src/parser/param.rs @@ -1,6 +1,6 @@ use syntax::ast::Ident; use syntax::ext::base::ExtCtxt; -use syntax::codemap::{Span, Spanned}; +use syntax::source_map::{Span, Spanned}; use utils::{span, SpanExt}; diff --git a/codegen/src/parser/route.rs b/codegen/src/parser/route.rs index c6841396..de5e79af 100644 --- a/codegen/src/parser/route.rs +++ b/codegen/src/parser/route.rs @@ -3,7 +3,7 @@ use std::collections::HashSet; use syntax::ast::*; use syntax::ext::base::{ExtCtxt, Annotatable}; -use syntax::codemap::{Span, Spanned, dummy_spanned}; +use syntax::source_map::{Span, Spanned, dummy_spanned}; use utils::{span, MetaItemExt, SpanExt, is_valid_ident}; use super::{Function, ParamIter}; diff --git a/codegen/src/parser/uri.rs b/codegen/src/parser/uri.rs index feebeed9..0ad13e5a 100644 --- a/codegen/src/parser/uri.rs +++ b/codegen/src/parser/uri.rs @@ -1,5 +1,5 @@ use syntax::ast::*; -use syntax::codemap::{Span, Spanned, dummy_spanned}; +use syntax::source_map::{Span, Spanned, dummy_spanned}; use syntax::ext::base::ExtCtxt; use rocket::http::uri::URI; diff --git a/codegen/src/utils/mod.rs b/codegen/src/utils/mod.rs index a610bb59..f1f2c74c 100644 --- a/codegen/src/utils/mod.rs +++ b/codegen/src/utils/mod.rs @@ -19,7 +19,7 @@ use syntax::parse::token::Token; use syntax::tokenstream::TokenTree; use syntax::ast::{Item, Expr, Attribute, Ty}; use syntax::ext::base::{Annotatable, ExtCtxt}; -use syntax::codemap::{Span, Spanned, DUMMY_SP}; +use syntax::source_map::{Span, Spanned, DUMMY_SP}; use syntax::ext::quote::rt::ToTokens; use syntax::print::pprust::item_to_string; use syntax::symbol::{Ident, Symbol}; @@ -75,7 +75,7 @@ pub fn attach_and_emit(out: &mut Vec, attr: Attribute, to: Annotata macro_rules! quote_enum { ($ecx:expr, $var:expr => $(::$root:ident)+ { $($variant:ident),+ ; $($extra:pat => $result:expr),* }) => ({ - use syntax::codemap::DUMMY_SP; + use syntax::source_map::DUMMY_SP; use syntax::ast::Ident; use $(::$root)+::*; let root_idents = vec![$(Ident::from_str(stringify!($root))),+]; diff --git a/codegen/src/utils/span_ext.rs b/codegen/src/utils/span_ext.rs index 41f17ce4..8797c80e 100644 --- a/codegen/src/utils/span_ext.rs +++ b/codegen/src/utils/span_ext.rs @@ -1,4 +1,4 @@ -use syntax::codemap::{Span, BytePos}; +use syntax::source_map::{Span, BytePos}; pub trait SpanExt { /// Trim the span on the left and right by `length`.