mirror of https://github.com/rwf2/Rocket.git
Update codegen and core for 2018-04-28 nightly.
This commit is contained in:
parent
3aefe4f894
commit
bd4e54609e
|
@ -8,7 +8,7 @@ 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-04-14";
|
||||
const MIN_DATE: &'static str = "2018-04-28";
|
||||
const MIN_VERSION: &'static str = "1.27.0-nightly";
|
||||
|
||||
fn main() {
|
||||
|
|
|
@ -89,7 +89,7 @@ pub fn from_form_derive(
|
|||
generics: ty::LifetimeBounds::empty(),
|
||||
explicit_self: None,
|
||||
args: vec![
|
||||
ty::Ptr(
|
||||
(ty::Ptr(
|
||||
Box::new(ty::Literal(ty::Path::new_(
|
||||
vec!["rocket", "request", "FormItems"],
|
||||
lifetime_var,
|
||||
|
@ -97,8 +97,8 @@ pub fn from_form_derive(
|
|||
ty::PathKind::Global,
|
||||
))),
|
||||
ty::Borrowed(None, Mutability::Mutable)
|
||||
),
|
||||
ty::Literal(ty::Path::new_local("bool")),
|
||||
), "it"),
|
||||
(ty::Literal(ty::Path::new_local("bool")), "strict"),
|
||||
],
|
||||
ret_ty: ty::Literal(ty::Path::new_(
|
||||
vec!["result", "Result"],
|
||||
|
|
|
@ -12,7 +12,7 @@ use syntax::ast::{Arg, Ident, Item, Stmt, Expr, MetaItem, Path};
|
|||
use syntax::ext::base::{Annotatable, ExtCtxt};
|
||||
use syntax::ext::build::AstBuilder;
|
||||
use syntax::parse::token;
|
||||
use syntax::symbol::InternedString;
|
||||
use syntax::symbol::LocalInternedString;
|
||||
use syntax::ptr::P;
|
||||
|
||||
use rocket::http::{Method, MediaType};
|
||||
|
@ -260,7 +260,7 @@ impl RouteParams {
|
|||
).expect("consistent uri macro item")
|
||||
}
|
||||
|
||||
fn explode(&self, ecx: &ExtCtxt) -> (InternedString, &str, Path, P<Expr>, P<Expr>) {
|
||||
fn explode(&self, ecx: &ExtCtxt) -> (LocalInternedString, &str, Path, P<Expr>, P<Expr>) {
|
||||
let name = self.annotated_fn.ident().name.as_str();
|
||||
let path = &self.uri.node.as_str();
|
||||
let method = method_to_path(ecx, self.method.node);
|
||||
|
|
|
@ -2,7 +2,7 @@ use utils::{self, ParserExt, SpanExt};
|
|||
|
||||
use syntax::codemap::{Spanned, Span};
|
||||
use syntax::ext::base::ExtCtxt;
|
||||
use syntax::symbol::InternedString;
|
||||
use syntax::symbol::LocalInternedString;
|
||||
use syntax::ast::{self, Expr, Name, Ident, Path};
|
||||
use syntax::parse::PResult;
|
||||
use syntax::parse::token::{DelimToken, Token};
|
||||
|
@ -27,7 +27,7 @@ pub enum Args {
|
|||
|
||||
#[derive(Debug)]
|
||||
pub struct UriParams {
|
||||
pub mount_point: Option<Spanned<InternedString>>,
|
||||
pub mount_point: Option<Spanned<LocalInternedString>>,
|
||||
pub route_path: Path,
|
||||
pub arguments: Option<Spanned<Args>>,
|
||||
}
|
||||
|
@ -67,7 +67,7 @@ impl UriParams {
|
|||
pub fn parse_prelude<'a>(
|
||||
ecx: &'a ExtCtxt,
|
||||
parser: &mut Parser<'a>
|
||||
) -> PResult<'a, (Option<Spanned<InternedString>>, Path)> {
|
||||
) -> PResult<'a, (Option<Spanned<LocalInternedString>>, Path)> {
|
||||
if parser.token == Token::Eof {
|
||||
return Err(ecx.struct_span_err(ecx.call_site(),
|
||||
"call to `uri!` cannot be empty"));
|
||||
|
|
|
@ -8,7 +8,7 @@ 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.
|
||||
const MIN_DATE: &'static str = "2018-04-03";
|
||||
const MIN_DATE: &'static str = "2018-04-28";
|
||||
const MIN_VERSION: &'static str = "1.27.0-nightly";
|
||||
|
||||
fn main() {
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
#![feature(plugin, decl_macro)]
|
||||
#![feature(try_trait)]
|
||||
#![feature(fnbox)]
|
||||
#![feature(never_type)]
|
||||
#![recursion_limit="256"]
|
||||
|
||||
#![plugin(pear_codegen)]
|
||||
|
|
Loading…
Reference in New Issue