Upgrade to syn-0.11

This commit is contained in:
Dirkjan Ochtman 2017-02-04 11:15:52 +01:00
parent 504a5f41b3
commit 69238e55d3
3 changed files with 5 additions and 5 deletions

6
Cargo.lock generated
View File

@ -19,7 +19,7 @@ name = "askama_derive"
version = "0.1.0"
dependencies = [
"askama 0.1.0",
"syn 0.10.8 (registry+https://github.com/rust-lang/crates.io-index)",
"syn 0.11.4 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@ -39,7 +39,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "syn"
version = "0.10.8"
version = "0.11.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"quote 0.3.12 (registry+https://github.com/rust-lang/crates.io-index)",
@ -55,5 +55,5 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
"checksum htmlescape 0.3.1 (git+https://github.com/veddan/rust-htmlescape)" = "<none>"
"checksum nom 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e5d4598834859fedb9a0a69d5b862a970e77982a92f544d547257a4d49469067"
"checksum quote 0.3.12 (registry+https://github.com/rust-lang/crates.io-index)" = "e7b44fd83db28b83c1c58187159934906e5e955c812e211df413b76b03c909a5"
"checksum syn 0.10.8 (registry+https://github.com/rust-lang/crates.io-index)" = "58fd09df59565db3399efbba34ba8a2fec1307511ebd245d0061ff9d42691673"
"checksum syn 0.11.4 (registry+https://github.com/rust-lang/crates.io-index)" = "f4f94368aae82bb29656c98443a7026ca931a659e8d19dcdc41d6e273054e820"
"checksum unicode-xid 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f860d7d29cf02cb2f3f359fd35991af3d30bac52c57d265a3c461074cb4dc"

View File

@ -12,4 +12,4 @@ proc-macro = true
[dependencies]
askama = { path = "../askama" }
syn = "0.10"
syn = "0.11"

View File

@ -50,7 +50,7 @@ fn get_template_source(tpl_file: &str) -> String {
pub fn derive_template(input: TokenStream) -> TokenStream {
let source = input.to_string();
let ast = syn::parse_macro_input(&source).unwrap();
let ast = syn::parse_derive_input(&source).unwrap();
let _ctx = match ast.body {
syn::Body::Struct(ref data) => data,
_ => panic!("#[derive(Template)] can only be used with structs"),