mirror of https://github.com/rwf2/Rocket.git
Update codegen for 2017-12-14 nightly.
This commit is contained in:
parent
6e18093c3a
commit
d22dbfbded
|
@ -8,7 +8,7 @@ use yansi::Color::{Red, Yellow, Blue, White};
|
||||||
use version_check::{supports_features, is_min_version, is_min_date};
|
use version_check::{supports_features, is_min_version, is_min_date};
|
||||||
|
|
||||||
// Specifies the minimum nightly version needed to compile Rocket's codegen.
|
// Specifies the minimum nightly version needed to compile Rocket's codegen.
|
||||||
const MIN_DATE: &'static str = "2017-12-13";
|
const MIN_DATE: &'static str = "2017-12-14";
|
||||||
const MIN_VERSION: &'static str = "1.24.0-nightly";
|
const MIN_VERSION: &'static str = "1.24.0-nightly";
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
|
|
|
@ -227,6 +227,7 @@
|
||||||
#[macro_use] extern crate log;
|
#[macro_use] extern crate log;
|
||||||
extern crate syntax;
|
extern crate syntax;
|
||||||
extern crate syntax_ext;
|
extern crate syntax_ext;
|
||||||
|
extern crate syntax_pos;
|
||||||
extern crate rustc_plugin;
|
extern crate rustc_plugin;
|
||||||
extern crate rocket;
|
extern crate rocket;
|
||||||
extern crate ordermap;
|
extern crate ordermap;
|
||||||
|
|
|
@ -72,11 +72,13 @@ pub fn attach_and_emit(out: &mut Vec<Annotatable>, attr: Attribute, to: Annotata
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn parse_as_tokens(ecx: &ExtCtxt, string: &str) -> Vec<TokenTree> {
|
pub fn parse_as_tokens(ecx: &ExtCtxt, s: &str) -> Vec<TokenTree> {
|
||||||
|
use syntax_pos::FileName;
|
||||||
use syntax::parse::parse_stream_from_source_str as parse_stream;
|
use syntax::parse::parse_stream_from_source_str as parse_stream;
|
||||||
|
|
||||||
let stream = parse_stream("<_>".into(), string.into(), ecx.parse_sess, None);
|
parse_stream(FileName::ProcMacroSourceCode, s.into(), ecx.parse_sess, None)
|
||||||
stream.into_trees().collect()
|
.into_trees()
|
||||||
|
.collect()
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct TyLifetimeRemover;
|
pub struct TyLifetimeRemover;
|
||||||
|
|
Loading…
Reference in New Issue