fix(dependencies): use working version of serde-codegen

This update fixes the build on stable, and allows builds
on nightly as usual.

The trick is to use the latest version of serde-codegen,
which keeps the syntex version internal, preventing clashes
between libraries that might have different requirements.
This commit is contained in:
Sebastian Thiel
2016-07-17 12:05:14 +02:00
parent 850e115e33
commit 3921b6a5a0
4 changed files with 11 additions and 16 deletions

View File

@@ -1,7 +1,5 @@
<%namespace name="util" file="../lib/util.mako"/>\
#[cfg(feature = "with-syntex")]
#[cfg(feature = "with-serde-codegen")]
mod inner {
extern crate syntex;
extern crate serde_codegen;
use std::env;
@@ -13,13 +11,11 @@ mod inner {
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("${util.crate_name()}", &src, &dst).unwrap();
serde_codegen::expand(&src, &dst).unwrap();
}
}
#[cfg(not(feature = "with-syntex"))]
#[cfg(not(feature = "with-serde-codegen"))]
mod inner {
pub fn main() {}
}

View File

@@ -24,5 +24,5 @@ ${lib.docs(c)}
#[cfg(feature = "nightly")]
include!("lib.rs.in");
#[cfg(feature = "with-syntex")]
#[cfg(feature = "with-serde-codegen")]
include!(concat!(env!("OUT_DIR"), "/lib.rs"));