syn-fold 0.0.1

Trait to transform a syn syntax tree by value.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use std::env;

fn main() {
    println!("cargo:rerun-if-changed=build.rs");
    println!("cargo:rustc-cfg=syn_non_exhaustive");
    println!("cargo:rustc-check-cfg=cfg(syn_non_exhaustive)");
    println!("cargo:rustc-check-cfg=cfg(feature, values(\"derive\", \"full\"))");

    let features = match env::var_os("DEP_SYN2_FEATURES") {
        Some(features) => features,
        None => "derive,full".into(),
    };
    if !features.is_empty() {
        for feature in features.to_str().unwrap().split(",") {
            println!("cargo:rustc-cfg=feature={:?}", feature);
        }
    }
}