chore(update): make regen-apis

Fixes #151
This commit is contained in:
Sebastian Thiel
2016-05-30 08:37:46 +02:00
parent 864fe8424d
commit c6f9205758
620 changed files with 7859 additions and 4576 deletions

View File

@@ -1,16 +1,28 @@
extern crate syntex;
extern crate serde_codegen;
#[cfg(feature = "with-syntex")]
mod inner {
extern crate syntex;
extern crate serde_codegen;
use std::env;
use std::path::Path;
use std::env;
use std::path::Path;
pub fn main() {
let out_dir = env::var_os("OUT_DIR").unwrap();
let src = Path::new("src/lib.rs.in");
let dst = Path::new(&out_dir).join("lib.rs");
let mut registry = syntex::Registry::new();
serde_codegen::register(&mut registry);
registry.expand("google-taskqueue1_beta2", &src, &dst).unwrap();
}
}
#[cfg(not(feature = "with-syntex"))]
mod inner {
pub fn main() {}
}
pub fn main() {
let out_dir = env::var_os("OUT_DIR").unwrap();
let src = Path::new("src/lib.rs.in");
let dst = Path::new(&out_dir).join("lib.rs");
let mut registry = syntex::Registry::new();
serde_codegen::register(&mut registry);
registry.expand("google-taskqueue1_beta2", &src, &dst).unwrap();
}
inner::main()
}

View File

@@ -182,6 +182,12 @@
// We don't warn about this, as depending on the API, some data structures or facilities are never used.
// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any
// unused imports in fully featured APIs. Same with unused_mut ... .
#![cfg_attr(feature = "nightly", feature(custom_derive, custom_attribute, plugin))]
#![cfg_attr(feature = "nightly", plugin(serde_macros))]
#![allow(unused_imports, unused_mut, dead_code)]
#[cfg(feature = "nightly")]
include!("lib.rs.in");
#[cfg(feature = "with-syntex")]
include!(concat!(env!("OUT_DIR"), "/lib.rs"));