derivor 0.0.1

Some useful Derive(Trait) macro options.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#[cfg(not(feature = "testing-helpers"))]
fn detect_nightly() {}

#[cfg(feature = "testing-helpers")]
fn detect_nightly() {
    use rustc_version::{version_meta, Channel};

    if version_meta().unwrap().channel == Channel::Nightly {
        println!("cargo:rustc-cfg=nightly");
    }
}

fn main() {
    detect_nightly();
}